silverhack/Install and run PSScriptAnalyzer
Install and run PSScriptAnalyzer
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| path | Specifies the path to the scripts or module to be analyzed. Wildcard characters are supported. | yes | .\ |
| customRulePath | Uses only the custom rules defined in the specified paths to the analysis. To still use the built-in rules, add the -IncludeDefaultRules switch. | no | — |
| recurseCustomRulePath | Adds rules defined in subdirectories of the CustomRulePath location. By default, Invoke-ScriptAnalyzer uses only the custom rules defined in the specified file or directory. To still use the built-in rules, additionally use the -IncludeDefaultRules switch. | no | — |
| excludeRule | Omits the specified rules from the Script Analyzer test. Wildcard characters are supported. | no | — |
| includeDefaultRules | Invoke default rules along with Custom rules. | no | — |
| includeRule | Runs only the specified rules in the Script Analyzer test. By default, PSScriptAnalyzer runs all rules. | no | — |
| severity | After running Script Analyzer with all rules, this parameter selects rule violations with the specified severity. | no | — |
| recurse | Runs Script Analyzer on the files in the Path directory and all subdirectories recursively. | no | — |
| suppressedOnly | Returns rules that are suppressed, instead of analyzing the files in the path. | no | — |
| fix | Fixes certain warnings which contain a fix in their DiagnosticRecord. | no | — |
| enableExit | Exits PowerShell and returns an exit code equal to the number of error records. This can be useful in CI systems. | no | — |
| reportSummary | Writes a report summary of the found warnings to the host. | no | — |
| settings | File path that contains user profile or hash table for ScriptAnalyzer. | no | — |
Outputs
no outputs