First Pass and a Invoke-Build script

This commit is contained in:
Wes Carroll
2019-02-19 17:28:13 -05:00
parent 51a3f204f5
commit d8a0bf4e69
+21
View File
@@ -0,0 +1,21 @@
task InstallDependencies {
Install-Module Pester -Force
Install-Module PSScriptAnalyzer -Force
}
task Analyze {
$scriptAnalyzerParams = @{
Path = "$BuildRoot\Functions\"
Severity = @('Error', 'Warning')
Recurse = $true
Verbose = $false
ExcludeRule = 'PSUseDeclaredVarsMoreThanAssignments'
}
$saresults = Invoke-ScriptAnalyzer @scriptAnalyzerParams
if ($saResults) {
$saResults | Format-Table
throw "One or more PSScriptAnalyzer errors/warnings were found"
}
}