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

Order of using directives should reset at preprocessor directives #1161

Closed
sharwell opened this issue Aug 8, 2015 · 1 comment
Closed

Order of using directives should reset at preprocessor directives #1161

sharwell opened this issue Aug 8, 2015 · 1 comment
Assignees
Milestone

Comments

@sharwell
Copy link
Member

sharwell commented Aug 8, 2015

The following block results in warnings regarding the order of preprocessor directives:

using System;
using Microsoft.VisualStudio;
using MyList = System.Collections.Generic.List<int>;

#if FORVS10 || FORVS12 || FORVS13 || FORVS15
using Microsoft.CodeAnalysis;
#else
using Microsoft.CodeAnalysis;
#endif

However, each time a preprocessor line is reached, the relative order of items should be reset. In other words, two using directives should not be compared to each other if a preprocessor line exists between them.

Actual Result

Warnings SA1210 and SA1209 are reported.

Expected result

No warnings.

Impact

This affects the usability of SA1208, SA1209, SA1210, SA1211, SA1216, and SA1217.

@sharwell sharwell changed the title Order of using directives should at preprocessor directives Order of using directives should reset at preprocessor directives Aug 9, 2015
@Noryoko
Copy link
Contributor

Noryoko commented Aug 9, 2015

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