From 8f5ba08edb75071d6b9c1224e2882a7c1b354ea2 Mon Sep 17 00:00:00 2001 From: Trent Blackburn Date: Wed, 19 Aug 2026 21:40:08 -0400 Subject: [PATCH 1/2] chore(lint): scope the analyzer by severity, drop redundant IncludeRules IncludeRules = @('*') is a no-op -- measured identical findings with and without it -- so the file said nothing at all. Replaces it with the Severity filter Microsoft's documented example uses, which drops four Information-level findings that nothing had decided should be in scope. --- PSScriptAnalyzerSettings.psd1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PSScriptAnalyzerSettings.psd1 b/PSScriptAnalyzerSettings.psd1 index e3487c2..3baa069 100644 --- a/PSScriptAnalyzerSettings.psd1 +++ b/PSScriptAnalyzerSettings.psd1 @@ -1,3 +1,6 @@ @{ - IncludeRules = @('*') + # Scope analysis to actionable severities. Microsoft's documented settings + # example does the same; without it Information-level findings are in scope + # with nothing having decided that they should be. + Severity = @('Error', 'Warning') } From 9620608a4b56fef4fa240c9fd91dcdd4b8ee9b27 Mon Sep 17 00:00:00 2001 From: Trent Blackburn Date: Wed, 19 Aug 2026 22:16:01 -0400 Subject: [PATCH 2/2] fix(lint): keep ParseError in the severity filter Naming Severity without ParseError hides syntax-broken files entirely: a file with a missing brace reports zero findings under @('Error','Warning'). Microsoft documents this as the way to suppress parse errors, which is the opposite of what a lint gate wants. --- PSScriptAnalyzerSettings.psd1 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/PSScriptAnalyzerSettings.psd1 b/PSScriptAnalyzerSettings.psd1 index 3baa069..b35a9ae 100644 --- a/PSScriptAnalyzerSettings.psd1 +++ b/PSScriptAnalyzerSettings.psd1 @@ -1,6 +1,11 @@ @{ - # Scope analysis to actionable severities. Microsoft's documented settings - # example does the same; without it Information-level findings are in scope - # with nothing having decided that they should be. - Severity = @('Error', 'Warning') + # 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') }