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 : False Positive #65

Open
anthonypetre opened this issue Mar 10, 2016 · 0 comments
Open

SA1208 : False Positive #65

anthonypetre opened this issue Mar 10, 2016 · 0 comments

Comments

@anthonypetre
Copy link

If the first token of a namespace begins with the string "System" then it is interpreted as a System namespace. For example, the following would be considered a System namespace under this rule:
using Systematics.Media.UI.ButtonIcons;

The Visual Studio setting "Place 'System' directives first when sorting usings" does NOT put these type of usings first, raising the false positive.

I propose tokenizing the namespace strings by '.' and looking for an exact match of "System" or "global::System" in the first token string to calculate isFirstSystem and isSecondSystem for CompareOrderOfUsingDirectives().

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

No branches or pull requests

1 participant