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

Error message consistency: "must not" vs "cannot" / "can not" in ArgumentException #54

Open
amanda-mitchell opened this issue Feb 27, 2019 · 0 comments
Labels
new analyzer Suggestion for a new analyzer to add

Comments

@amanda-mitchell
Copy link
Contributor

amanda-mitchell commented Feb 27, 2019

When creating an ArgumentException with a message parameter (and all calls should use that parameter, right?), the phrase "must not" should be preferred over "cannot" and "can not".

Presumably, this could be found by searching for the Regex @"\bcan ?not\b" (culture invariant, case insensitive) in the text of ArgumentExceptions and offering a code fix provider that changes the affected text to "must not".

@amanda-mitchell amanda-mitchell added the new analyzer Suggestion for a new analyzer to add label Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new analyzer Suggestion for a new analyzer to add
Development

No branches or pull requests

1 participant