Repository navigation
fix(powershell): correct false severity claim in a settings comment - #72
Conversation
The comment above PSUseDeclaredVarsMoreThanAssignments claimed the entry promotes the rule to Error, but a PSScriptAnalyzer settings file cannot re-map a rule's severity — the entry only enables the rule. Restate the actual behavior: findings surface at the shipped Warning, which the top-level Severity filter already lets block. Comment-only change. Found by a cross-repo audit of consumers (dotfiles, provisioning), which deliberately did not fork the fix locally, preserving byte-parity with this SSOT so it lands here and flows out via re-copy. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_011Bh4hQWCEw3ZJoyQ7nhqVH
|
Claude finished @kyle-sexton's task in 51s —— View job PR Review
Verdict: Approve — factually correct, well-worded, no issues. This is a comment-only change; no functional behaviour is altered. Technical accuracyThe original comment ("promote to Error") was wrong on two levels:
The new comment is accurate on both counts, and the cross-reference to the top-level StyleThe new comment (lines 114–116) is consistent with the surrounding block comments — uses the same em dash (—) convention, capitalises severity names to match PSScriptAnalyzer's own terminology, and wraps at the same column width. No issues. Verification claimsThe PR body states 3/3 tests pass ( No concerns. Ready to merge. |
|
Claude finished @kyle-sexton's task in 55s —— View job
PR ReviewVerdict: Approve — factually correct, no issues. The synchronize event was caused by a merge-from-main commit ( Change
-# Unused variables are bugs in automation scripts — promote to Error.
+# Unused variables are bugs in automation scripts. A settings file
+# cannot re-map a rule's severity, so findings surface at the shipped
+# Warning — which the top-level Severity filter above lets block.Technical accuracyThe new comment is correct on all three claims:
StyleThe new comment uses the same em dash (—) convention and column width as the surrounding block comments. No issues. No concerns. Ready to merge. |


Context
A cross-repo audit of the consumers that adopt this catalog's configs by copy (kyle-sexton/dotfiles, kyle-sexton/provisioning) surfaced two fixes that appeared to exist downstream without having been propagated to this SSOT. Verification against
origin/mainshowed only one still needs to land:lychee private-repo exclusions — already upstream, no change. provisioning fixed its scheduled online link-check 404ing on links to private constellation repos (kyle-sexton/provisioning#42 context), and dotfiles just adopted the same fix. This SSOT already carries it via fix(lychee): exclude private constellation repos from the online lane #58:
modules/lychee/lychee.tomlonmainis byte-identical to provisioning's copy (including the later(\.git)?clone-URL arm). The dotfiles copy is actually one revision behind — it predates the(\.git)?refinement — so the flow needed there is a re-copy from here, not a port to here.PSScriptAnalyzer settings comment — fixed in this PR. The comment above the
PSUseDeclaredVarsMoreThanAssignmentsentry claimed it "promotes to Error". That is factually wrong: a PSScriptAnalyzer settings file cannot re-map a rule's severity; the entry only enables the rule, and findings surface at the shipped Warning (which the top-levelSeverityfilter already lets block). The comment now states the actual behavior. Comment-only; no functional change.The PSSA fix was deliberately not forked in the consumers, preserving byte-parity with this SSOT — it must land here and flow out via re-copy.
Verification
modules/powershell/powershell.test.sh: 3/3 PASS.Invoke-ScriptAnalyzeron the changed file (self-hosted settings): clean.Propagation
After merge, consumers with copied configs should re-vendor:
PSScriptAnalyzerSettings.psd1(this fix) andmodules/lychee/lychee.toml(to pick up the(\.git)?arm it is missing).PSScriptAnalyzerSettings.psd1(its lychee copy is already current).🤖 Generated with Claude Code
https://claude.ai/code/session_011Bh4hQWCEw3ZJoyQ7nhqVH
Note
Low Risk
Documentation-only comment change in shared PowerShell lint settings; no runtime or enforcement behavior changes.
Overview
Comment-only fix above
PSUseDeclaredVarsMoreThanAssignmentsinPSScriptAnalyzerSettings.psd1.The old note said unused-variable findings are promoted to Error. That was wrong: enabling a rule in a PSScriptAnalyzer settings file does not change its shipped severity. The comment now says findings stay at the rule’s default Warning, and that the file’s top-level
Severitylist is what can still make those findings block CI.No settings keys or rule configuration changed.
Reviewed by Cursor Bugbot for commit afa1834. Bugbot is set up for automated code reviews on this repo. Configure here.