Skip to content

Commit

Permalink
Commit build changes [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuBuisson committed Jul 1, 2017
1 parent 4492050 commit eb641bb
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PSCodeHealth/PSCodeHealth.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = '.\PSCodeHealth.psm1'

# Version number of this module.
ModuleVersion = '0.1.145'
ModuleVersion = '0.1.146'

# ID used to uniquely identify this module
GUID = 'ca22dabd-bbb6-4805-9c90-a8aad6dbbfd3'
Expand Down
50 changes: 50 additions & 0 deletions docs/PublicFunctions/Invoke-PSCodeHealth.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@ Gets quality and maintainability metrics for PowerShell code contained in script

## SYNTAX

### Default (Default)
```
Invoke-PSCodeHealth [[-Path] <String>] [[-TestsPath] <String>] [[-TestsResult] <PSObject>] [-Recurse]
[-Exclude <String[]>]
```

### HtmlReport
```
Invoke-PSCodeHealth [[-Path] <String>] [[-TestsPath] <String>] [[-TestsResult] <PSObject>] [-Recurse]
[-Exclude <String[]>] -HtmlReportPath <String> [-PassThru]
```

## DESCRIPTION
Gets quality and maintainability metrics for PowerShell code contained in scripts, modules or directories.
These metrics relate to :
Expand Down Expand Up @@ -39,6 +46,15 @@ Gets quality and maintainability metrics for code from PowerShell files in the d

This command will look for tests located in the directory C:\GitRepos\MyModule\Tests\, and any subdirectories.

### -------------------------- EXAMPLE 3 --------------------------
```
Invoke-PSCodeHealth -Path 'C:\GitRepos\MyModule' -TestsPath 'C:\GitRepos\MyModule\Tests' -HtmlReportPath .\Report.html -PassThru
```

Gets quality and maintainability metrics for code from PowerShell files in the directory C:\GitRepos\MyModule\.

This command will create an HTML report (Report.html) in the current directory and a PSCodeHealth.Overall.HealthReport object to the pipeline.

## PARAMETERS

### -Path
Expand Down Expand Up @@ -131,6 +147,40 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -HtmlReportPath
To instruct Invoke-PSCodeHealth to generate an HTML report, and specify the path where the HTML file should be saved.

The path must include the folder path (which has to exist) and the file name.

```yaml
Type: String
Parameter Sets: HtmlReport
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -PassThru
When the parameter HtmlReportPath is used, by default, Invoke-PSCodeHealth doesn't output a \[PSCodeHealth.Overall.HealthReport\] object to the pipeline.

The PassThru parameter allows to instruct Invoke-PSCodeHealth to output both an HTML report file and a \[PSCodeHealth.Overall.HealthReport\] object.

```yaml
Type: SwitchParameter
Parameter Sets: HtmlReport
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

## INPUTS

## OUTPUTS
Expand Down

0 comments on commit eb641bb

Please sign in to comment.