ci(lint): update PSScriptAnalyzer invocation to use custom settings file

This commit is contained in:
Simone
2026-05-13 18:37:56 +02:00
committed by Simone
parent 81c85beb81
commit e09c0cf5a5
+3 -2
View File
@@ -44,10 +44,11 @@ jobs:
Install-Module PSScriptAnalyzer -Scope CurrentUser -Force -AllowClobber Install-Module PSScriptAnalyzer -Scope CurrentUser -Force -AllowClobber
} }
$paths = @('scripts', 'template', 'runner', 'Setup-Host.ps1') $settings = Join-Path $PWD 'PSScriptAnalyzerSettings.psd1'
$paths = @('scripts', 'template', 'Setup-Host.ps1')
$results = $paths | ForEach-Object { $results = $paths | ForEach-Object {
if (Test-Path $_) { if (Test-Path $_) {
Invoke-ScriptAnalyzer -Path $_ -Recurse -Severity Error,Warning Invoke-ScriptAnalyzer -Path $_ -Recurse -Settings $settings -Severity Error,Warning
} }
} }