Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New rule (disabled by default): AvoidUsingDoubleQuotesForConstantString #1470

Conversation

@bergmeister
Copy link
Collaborator

bergmeister commented May 4, 2020

PR Summary

Closes #292
The rule is disabled by default to avoid breaking lots of people's CI pipeline and its main purpose is to be used in the formatter. The rule was kept quite simple to not touch constant strings that use single quotes (because then one would have to escape them, which would make the code uglier and therefore is a general exception) or have escape sequences, here it is up to the user.

PR Checklist

@rjmholt
rjmholt approved these changes May 4, 2020
Rules/AvoidUsingDoubleQuotesForConstantString.cs Outdated Show resolved Hide resolved
Rules/AvoidUsingDoubleQuotesForConstantString.cs Outdated Show resolved Hide resolved
Rules/AvoidUsingDoubleQuotesForConstantString.cs Outdated Show resolved Hide resolved
Rules/AvoidUsingDoubleQuotesForConstantString.cs Outdated Show resolved Hide resolved
bergmeister and others added 2 commits May 4, 2020
Co-authored-by: Robert Holt <rjmholt@gmail.com>
Christoph Bergmeister
bergmeister and others added 3 commits May 4, 2020
Co-authored-by: Robert Holt <rjmholt@gmail.com>
… not have PSAvoidUsingDoubleQuotesForConstantString violations itself
… into AvoidUsingDoubleQuotesForConstantString

# Conflicts:
#	Tests/Engine/GetScriptAnalyzerRule.tests.ps1
@bergmeister bergmeister merged commit ca4221f into PowerShell:master Jun 11, 2020
3 checks passed
3 checks passed
PSScriptAnalyzer-CI #20200611.6 succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
license/cla All CLA requirements met.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.