SA1210: Using directives should be ordered alphabetically by namespace
Cause
The using directives within a C# code file are not sorted alphabetically by namespace.
Rule description
A violation of this rule occurs when the using directives are not sorted alphabetically by namespace. Sorting the using directives alphabetically makes the code cleaner and easier to read, and can help make it easier to identify the namespaces that are being used by the code. By default, the System namespaces are an exception to this rule and precede all other namespaces. See SA1208 for more details. This exception can be turned off by setting systemUsingDirectivesFirst to false (see Configuration.md), in which case the System namespaces are sorted alphabetically along with all other namespaces.
Global using directives (C# 10) are analyzed independently from local using directives. Diagnostics and fixes compare only directives which both use, or both omit, the global modifier.
How to fix violations
To fix an instance of this violation, order the using directives alphabetically by namespace, with all the System namespace entries first unless systemUsingDirectivesFirst is false.
How to suppress violations
[SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1210:UsingDirectivesMustBeOrderedAlphabeticallyByNamespace", Justification = "Reviewed.")]
#pragma warning disable SA1210 // UsingDirectivesMustBeOrderedAlphabeticallyByNamespace
#pragma warning restore SA1210 // UsingDirectivesMustBeOrderedAlphabeticallyByNamespace