Using static directives should be placed at the correct location
See original GitHub issueglobal imports need to be before normal imports.
global using NExpect;
global using NSubstitute;
global using NUnit.Framework;
#pragma warning disable SA1216 // Using static directives should be placed at the correct location
global using static NExpect.Expectations;
#pragma warning restore SA1216 // Using static directives should be placed at the correct location
using System;
using System.IO;
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
StyleCopAnalyzers/documentation/SA1216.md at master
A using static directive is positioned at the wrong location (before a regular using directive or after an alias using directive).
Read more >using directive - C# Reference
A using directive doesn't give you access to any namespaces that are nested in the namespace you specify. Namespaces come in two categories: ......
Read more >Resolve warnings related using namespaces
Any global using directives must precede any non-global using directives in that source file, and must not be placed in a namespace ....
Read more >Automatically place the 'System' directives first when 'Sorting ...
While this is fine, Static Code analysis says, all the system directives should come first. And, now if you run the stylecop, if...
Read more >C++ static code analysis: "using namespace" directives ...
A using directive makes names from another namespace available in the current scope. It should only be used when those names do not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Will refactor to use implicit using 😏
https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#using
https://endjin.com/blog/2021/09/dotnet-csharp-10-implicit-global-using-directives https://docs.microsoft.com/en-us/dotnet/core/project-sdk/overview#implicit-using-directives