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

SA1208 Codefix puts the usings into the namespace #2251

Closed
stefannikolei opened this issue Dec 14, 2016 · 4 comments
Closed

SA1208 Codefix puts the usings into the namespace #2251

stefannikolei opened this issue Dec 14, 2016 · 4 comments

Comments

@stefannikolei
Copy link

I think this Codefix does more than it should.

When applying this fix all the usings are put into the namespace. This should be handled by SA1200

@vweijsters
Copy link
Contributor

Due to the complexity of properly reordering using statements, there is no specific fix for SA1208. There is a fix that will properly order using statements according to the settings provided. This fix covers SA1200, SA1208, SA1209, SA1210, SA1211, SA1216, and SA1217.

The behavior that you are seeing is therefore by design.

@bjornhellander
Copy link
Contributor

So what you can do, @reaction1989, is to configure StyleCop.Analyzers to behave as you like, according to https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/Configuration.md
Specifically where you want the usings: inside, outside or don't care.

@sharwell
Copy link
Member

@vweijsters I thought this was fixed as part of #2027?

@vweijsters
Copy link
Contributor

My bad, I forgot all about that. It has been fixed indeed, 1.1.0-beta1 contains the fix.
Just verified again to make sure that it is working as it should.

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

4 participants