Fix false positive in Standards Police warning warning SP1004

- "warning SP1004: namespaces not alphabetized"
- Any using statement can come after "using System;"
This commit is contained in:
Stephen Halter 2015-09-17 00:51:43 -07:00
parent 47323a88e1
commit 6f8c040cfe
1 changed files with 4 additions and 0 deletions

View File

@ -66,6 +66,10 @@ namespace Microsoft.StandardsPolice
{
acceptableOrder = true;
}
if (!acceptableOrder && priorUsingDirective.Name.ToString() == "System")
{
acceptableOrder = true;
}
if (!acceptableOrder &&
priorUsingDirective.Name.ToString().StartsWith("System.") &&
!usingDirective.Name.ToString().StartsWith("System."))