question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using static directives should be placed at the correct location

See original GitHub issue

global 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:open
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found