diff --git a/PSScriptAnalyzerSettings.psd1 b/PSScriptAnalyzerSettings.psd1 index e3487c2..b35a9ae 100644 --- a/PSScriptAnalyzerSettings.psd1 +++ b/PSScriptAnalyzerSettings.psd1 @@ -1,3 +1,11 @@ @{ - IncludeRules = @('*') + # Scope analysis to actionable severities, dropping Information-level noise. + # + # ParseError must be listed. It is how PSScriptAnalyzer reports a file it + # could not parse at all, and naming Severity without it silently hides + # syntax-broken files: a file with a missing brace reports zero findings + # under @('Error', 'Warning'). Microsoft's documentation states this + # directly -- "To suppress ParseErrors, don't include it as a value in the + # Severity parameter" -- which is exactly what must not happen to a lint gate. + Severity = @('ParseError', 'Error', 'Warning') }