From 032d6f200eb57e4e453a5c2834bd706abcbafe2e Mon Sep 17 00:00:00 2001 From: Simone Date: Wed, 13 May 2026 18:58:20 +0200 Subject: [PATCH] ci(lint): add rule to suppress false positives for param() in remote script blocks --- PSScriptAnalyzerSettings.psd1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PSScriptAnalyzerSettings.psd1 b/PSScriptAnalyzerSettings.psd1 index 976f17b..b348f5e 100644 --- a/PSScriptAnalyzerSettings.psd1 +++ b/PSScriptAnalyzerSettings.psd1 @@ -11,6 +11,12 @@ 'PSUseConsistentIndentation', 'PSUseConsistentWhitespace', + # The codebase uses the param() + -ArgumentList pattern for remote script blocks + # (Invoke-Command, Start-Job) consistently and correctly. PSSA does not recognise + # param() inside a ScriptBlock as a local declaration, so it fires a false positive + # on every parameter. $Using: is an alternative but not required here. + 'PSUseUsingScopeModifierInNewRunspaces', + # UTF-8 without BOM is the editor default; adding BOM to ~35 files is cosmetic # and does not affect PS 5.1 execution. 'PSUseBOMForUnicodeEncodedFile',