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

Code fix for SA1025 (multiple whitespace) conflicts with SA1008/SA1009 (parenthesis spacing) #1276

Open
otac0n opened this issue Aug 24, 2015 · 3 comments

Comments

@otac0n
Copy link
Contributor

otac0n commented Aug 24, 2015

The code fix for SA1025 is shown in this scenario:

typeof(   string   )

Ideally, only the SA1008 and SA1009 code fixes would be presented. Using the SA1025 code fix here leaves the SA1008 and SA1009 warnings around. The user gets very little indication that there were actually two violations.

This is not that bad of a user experience, but it is confusing to have to fix the same spacing twice (even for different reasons). It makes it feel (to the user) like the code fix itself is broken. I was trying to demo this to my team, and it looked like a hiccup.

The SA1008 or SA1009 fixes also fix SA1025 automatically, of course.

@sharwell
Copy link
Member

I really want to close this as won't fix because no one writes code like that (and technically the fixes do work even if they did), but I'll wait for a second opinion on that. 😑

@otac0n
Copy link
Contributor Author

otac0n commented Aug 24, 2015

That's completely fair. I just wanted to register it as a concern. I do demo SyleCop.Analyzers like that, for what it's worth.

@sharwell
Copy link
Member

Marked as up for grabs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants