Skip to content

Measure Help

James Brundage edited this page Apr 22, 2022 · 4 revisions

Measure-Help

Synopsis

Determines the percentage of documentation


Description

Determines the percentage of documentation in a given script


Related Links


Examples

EXAMPLE 1

dir -Filter *.ps1 | Measure-Help

EXAMPLE 2

Get-Command -Module HelpOut | Measure-Help

EXAMPLE 3

Measure-Help {
    # This script has some documentation, and then a bunch of code that literally does nothing
    $null = $null # The null equivilancy 
    $null * 500 # x times nothing is still nothing
    $null / 100 # Nothing out of 100             
} | Select-Object -ExpandProperty PercentageDocumented

Parameters

FilePath

The path to the file

Type Requried Postion PipelineInput
[String] true 1 true (ByPropertyName)

ScriptBlock

A PowerShell script block

Type Requried Postion PipelineInput
[ScriptBlock] true named true (ByPropertyName)

Name

The name of the script being measured.

Type Requried Postion PipelineInput
[String] false named true (ByPropertyName)

Syntax

Measure-Help [-FilePath] <String> [<CommonParameters>]
Measure-Help -ScriptBlock <ScriptBlock> [-Name <String>] [<CommonParameters>]

Testing if custom sidebar overrides automatic

Clone this wiki locally