BrightLight / YouShouldSpellcheck.Analyzer

A Roslyn based spellchecker analyzer
Apache License 2.0
7 stars 0 forks source link

Consider code styles #13

Open BrightLight opened 6 years ago

BrightLight commented 6 years ago

For instance, for public const string XmlVersion = "Version"; I get the suggestion to replace "Xml" with "XML". That suggestion is fine for literal strings or XML comments, but my code styles require pacal casing for identifiers, so XmlVersion is correct and XMLVersion would be wrong (and trigger other issues).

aarondandy commented 6 years ago

Some things I did to handle this in my old tools:

BrightLight commented 6 years ago

Thanks, @aarondandy. I will give that a try. Suggestion 2 might be a bit tricky to implement, because, for performance reasons, I'm currently querying the suggestions only after the user started the code fix (to provide suggestions). Which means I might end up showing squiggly lines but then I don't have and suggestions to show. :-) I already have this issue, though, when I'm ruling out suggestions that are not valid for identifiers, like hyphenated phrases.