Fixes of around 350 PSScriptAnalyzer warnings#4213
Fixes of around 350 PSScriptAnalyzer warnings#4213bergmeister wants to merge 4 commits intoPowerShell:masterfrom
Conversation
|
@bergmeister, |
|
@bergmeister Thanks for your conttribution! |
|
@bergmeister Sorry, it seems @lzybkr meant that we should put each change kind in separate commit: %, ?, OutputType, $null and so on. I have no idea how this could be done now without a complete re-work. @lzybkr Can we review as is? |
|
If you do a soft reset, then |
|
OK. I have created #4261, which contains the separation of the commits as requested and will close this one. |
This is the clean and rebased version with the split into 4 separate commits as requested by the original PR #4205
Most of them are fixes of PSPossibleIncorrectComparisonWithNull, PSAvoidUsingCmdletAliases (mostly for ForEach-Object, Where-Object, Select-Object) and some PSUseDeclaredVarsMoreThanAssignment warnings.
As part of this, it was also found that a test in ParameterBindingTests needed improvement because since the null comparison is now correct, the test failed initially and needed correcting.