Initial commit
This commit is contained in:
17
BuildTasks/Analyze.Task.ps1
Normal file
17
BuildTasks/Analyze.Task.ps1
Normal file
@@ -0,0 +1,17 @@
|
||||
task Analyze {
|
||||
$params = @{
|
||||
IncludeDefaultRules = $true
|
||||
Path = $ManifestPath
|
||||
Settings = "$BuildRoot\ScriptAnalyzerSettings.psd1"
|
||||
Severity = 'Warning'
|
||||
}
|
||||
|
||||
"Analyzing $ManifestPath..."
|
||||
$results = Invoke-ScriptAnalyzer @params
|
||||
if ($results)
|
||||
{
|
||||
'One or more PSScriptAnalyzer errors/warnings were found.'
|
||||
'Please investigate or add the required SuppressMessage attribute.'
|
||||
$results | Format-Table -AutoSize
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user