Fixed erroneous PSUseDeclaredVarsMoreThanAssignments for some globals variables by John-Leitch · Pull Request #2013 · PowerShell/PSScriptAnalyzer
added 2 commits
July 10, 2024 22:47rjmholt added a commit to rjmholt/PSScriptAnalyzer that referenced this pull request
Feb 23, 2026UseDeclaredVarsMoreThanAssignments (PowerShell#2013): skip scope-qualified variable references ($global:, $script:, drive-qualified) when checking for uses of local variables, preventing false negatives. AvoidPositionalParameters (PowerShell#1850): skip commands that have no parameters in the database (e.g. native CLI tools like az). Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters