Files
Chronometer/BuildTasks/Analyze.Task.ps1
Kevin Marquette dcb3f40371 Initial commit
2018-03-25 15:39:30 -07:00

18 lines
525 B
PowerShell

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
}
}