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

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

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 20:03
Co-authored-by: Robert Holt <rjmholt@gmail.com>
bergmeister and others added 3 commits May 4, 2020 21:57
Co-authored-by: Robert Holt <rjmholt@gmail.com>
… not have PSAvoidUsingDoubleQuotesForConstantString violations itself
… into AvoidUsingDoubleQuotesForConstantString

# Conflicts:
#	Tests/Engine/GetScriptAnalyzerRule.tests.ps1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New rule - "Use single quotes unless you need double quotes to enclose expressions or variables"
2 participants