Skip to content

Commit

Permalink
[lint.ps1] Ignore PSAvoidUsingPositionalParameters
Browse files Browse the repository at this point in the history
I do not understand why this linter has started complaining now, as we
use positional parameters in many functions:

```
packages\common.vm\tools\vm.common\vm.common.psm1
1 rule violation found.    Severity distribution:  Error = 0, Warning = 0, Information = 1

RuleName                            Severity     ScriptName Line  Message
--------                            --------     ---------- ----  -------
PSAvoidUsingPositionalParameters    Information  vm.common. 393   Cmdlet 'VM-Install-From-Zip' has positional
                                                 psm1             parameter. Please use named parameters instead of
                                                                  positional parameters when calling a command.
```

Exclude this violation as it is of `Information` severity and we would
need to make a lot of changes to fix it.
  • Loading branch information
Ana06 committed Apr 18, 2024
1 parent 1dc8e6e commit be358d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/test/lint.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PSUseApprovedVerbs is disabled to support VM- functions
# TODO: Enable other rules
$excludedRules = "PSAvoidUsingInvokeExpression", "PSUseApprovedVerbs", "PSAvoidUsingWriteHost", "PSUseShouldProcessForStateChangingFunctions", "PSUseSingularNouns"
$excludedRules = "PSAvoidUsingInvokeExpression", "PSUseApprovedVerbs", "PSAvoidUsingWriteHost", "PSUseShouldProcessForStateChangingFunctions", "PSUseSingularNouns", "PSAvoidUsingPositionalParameters"

choco install psscriptanalyzer --version 1.20.0 --no-progress

Expand Down

0 comments on commit be358d4

Please sign in to comment.