We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Create a file that looks like this:
// <copyright file="Program.cs" company="PlaceholderCompany"> // Copyright (c) PlaceholderCompany. All rights reserved. // </copyright> // xxxyyy using System; using System.Runtime.InteropServices; namespace Cdg.Interop { /// <summary>A monthly dow.</summary> [CLSCompliant(false)] [StructLayout(LayoutKind.Sequential)] public struct MonthlyDow { int foo; } }
It will complain that the using directives are not within the namespace with warning SA1200. Apply the code fix. The resulting code looks like this:
// <copyright file="Program.cs" company="PlaceholderCompany"> // Copyright (c) PlaceholderCompany. All rights reserved. // </copyright> namespace Cdg.Interop { // xxxyyyusing System; using System.Runtime.InteropServices; /// <summary>A monthly dow.</summary> [CLSCompliant(false)] [StructLayout(LayoutKind.Sequential)] public struct MonthlyDow { int foo; } }
The comment above the usings moved into the namespace and effectively commented out the "using System".
The text was updated successfully, but these errors were encountered:
Fix handling of trivia before first using directive
1aa93b0
Fixes DotNetAnalyzers#2363
1c74e8f
42bbb42
49986c4
sharwell
Successfully merging a pull request may close this issue.
Create a file that looks like this:
It will complain that the using directives are not within the namespace with warning SA1200. Apply the code fix. The resulting code looks like this:
The comment above the usings moved into the namespace and effectively commented out the "using System".
The text was updated successfully, but these errors were encountered: