< Back

Test-PSBuildScriptAnalysis

Sat Jan 18, 2020 9:34 pm

NAME Test-PSBuildScriptAnalysis



SYNOPSIS

Run PSScriptAnalyzer tests against a module.





SYNTAX

Test-PSBuildScriptAnalysis [-Path] <String> [[-SeverityThreshold] <String>] [[-SettingsPath] <String>]

[<CommonParameters>]





DESCRIPTION

Run PSScriptAnalyzer tests against a module.





PARAMETERS

-Path <String>

Path to PowerShell module directory to run ScriptAnalyser on.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SeverityThreshold <String>

Fail ScriptAnalyser test if any issues are found with this threshold or higher.



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SettingsPath <String>

Path to ScriptAnalyser settings to use.



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS>Test-PSBuildScriptAnalysis -Path ./Output/Mymodule/0.1.0 -SeverityThreshold Error



Run ScriptAnalyzer on built module in ./Output/Mymodule/0.1.0. Throw error if any errors are found.











RELATED LINKS