|
|
|
@ -34,7 +34,7 @@ Install-PSModule -Name PSScriptAnalyzer -RequiredVersion 1.20.0
|
|
|
|
|
if ($IsContainer) {
|
|
|
|
|
# PSScriptAnalyzer contain lots of json files for the UseCompatibleCommands check. We don't use this rule so by
|
|
|
|
|
# removing the contents we can save 200MB in the docker image (or more in the future).
|
|
|
|
|
# https://github.com/PowerShell/PSScriptAnalyzer/blob/master/RuleDocumentation/UseCompatibleCommands.md
|
|
|
|
|
# https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules/UseCompatibleCommands.md
|
|
|
|
|
$pssaPath = (Get-Module -ListAvailable -Name PSScriptAnalyzer).ModuleBase
|
|
|
|
|
$compatPath = Join-Path -Path $pssaPath -ChildPath compatibility_profiles -AdditionalChildPath '*'
|
|
|
|
|
Remove-Item -Path $compatPath -Recurse -Force
|
|
|
|
|