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

usingDirectivesPlacement should be ignored unless fixing SA1200 #2027

Closed
sharwell opened this issue Jan 6, 2016 · 1 comment
Closed

usingDirectivesPlacement should be ignored unless fixing SA1200 #2027

sharwell opened this issue Jan 6, 2016 · 1 comment
Assignees
Milestone

Comments

@sharwell
Copy link
Member

sharwell commented Jan 6, 2016

Currently the using directives code fix uses the current usingDirectivesPlacement setting when organizing using directives for any supported diagnostic. This behavior will not correctly handle cases where diagnostic suppressions are used to disable particular instances of SA1200.

To correct this issue, the code fix should operate as though usingDirectivesPlacement were set to ignore when fixing any diagnostic other than SA1200.

Example code

using System;
using System.Reflection;
using System.Net;

namespace MyNamespace
{
    using System.ServiceModel.Channels;
}

Operation

Fix all violations of SA1210.

Expected result

using System;
using System.Net;
using System.Reflection;

namespace MyNamespace
{
    using System.ServiceModel.Channels;
}

Actual result

using System;
using System.Net;
using System.Reflection;
using System.ServiceModel.Channels;

namespace MyNamespace
{
}
@vweijsters
Copy link
Contributor

Grabbing this

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