-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Area-AnalyzersBugResolution-By DesignThe behavior reported in the issue matches the current designThe behavior reported in the issue matches the current designVerified
Description
One of the StyleCop analyzers we implemented (SA1408) adds parentheses around certain expressions in code. The code fix provider implementation does not use Formatter.Annotation, and we have a unit test which verifies the code fix does not alter existing formatting aside from adding ( and ) characters.
The unit test in question was successful in the Beta 1 code. With no change aside from updating to Beta 2, the test now fails.
Here is the affected expression as produced by Beta 1:
bool z = z ? (true&&true)||false :false;Here is the affected expression as produced by Beta 2:
bool z = z ? (true && true) || false :false;The two expressions differ by a total of 4 space characters.
Questions:
- ❓ Is there a way to cause Beta 2 to behave like Beta 1? Our diagnostics and code fixes relate specifically to code formatting so they will not work if the implementation changes unrelated formatting.
- ❓ Was the behavior change in Beta 2 intended, and/or will it be reverted in the next release?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-AnalyzersBugResolution-By DesignThe behavior reported in the issue matches the current designThe behavior reported in the issue matches the current designVerified