PSAvoidUsingDoubleQuotesForConstantString doesn't work
See original GitHub issueSystem Details
System Details Output
### VSCode version: 1.53.2 622cb03f7e070a9670c94bae1a45d78d7181fbd4 x64
### VSCode extensions:
bradlc.vscode-tailwindcss@0.5.9
dbaeumer.vscode-eslint@2.1.14
ecmel.vscode-html-css@1.10.2
esbenp.prettier-vscode@5.9.2
ms-azuretools.vscode-docker@1.10.0
ms-vscode-remote.remote-containers@0.158.0
ms-vscode.cpptools@1.2.1
ms-vscode.powershell@2020.6.0
ms-vscode.vscode-typescript-tslint-plugin@1.3.3
ms-vsliveshare.vsliveshare@1.0.3784
octref.vetur@0.32.0
platformio.platformio-ide@2.2.1
### PSES version: 2.2.0.0
### PowerShell version:
Name Value
---- -----
PSVersion 7.1.2
PSEdition Core
GitCommitId 7.1.2
OS Darwin 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Issue Description
I am experiencing a problem with PSAvoidUsingDoubleQuotesForConstantString
not working.
Expected Behaviour
It should print
RuleName Severity ScriptName Line Message
-------- -------- ---------- ---- -------
PSAvoidUsingDoubleQuotesForConstant Information Test.ps1 1 Use single quotes when a string is constant.
String
Actual Behaviour
No problem is reported.
Also, running:
Invoke-ScriptAnalyzer -Path Test.ps1 -Settings PSScriptAnalyzerSettings.psd1
or
Invoke-ScriptAnalyzer -Path Test.ps1 -Settings PSScriptAnalyzerSettings.psd1 -Severity Information
doesn’t print anything.
Attached Logs
Here are the files: 1614203961.zip.
Issue Analytics
- State:
- Created 3 years ago
- Comments:17
Top Results From Across the Web
Visual Studio Code - Useful Extensions : r/PowerShell - Reddit
VSCode Icons: This extension will add icons to the side navigation bar not only for file types but based on folder names as...
Read more >Powershell - Gamedev Guide - ikrima.dev
can run commands stored in variables and represented by strings. does not parse or interpret command parameters. PowerShell
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After you installed the new module in iTerm, a reload of the Integrated Console will pick that up. That’s the difference.
The module won’t be loaded until you import it or autoload it by running a command from it. Running
Invoke-ScriptAnalyzer
autoloaded it, so thengmo
succeeded.I ran the
Invoke-ScriptAnalyzer
and thengmo PSScriptAnalyzer
again and now it does printAnd yes, the problem is now reported, thanks for the help!