-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
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
.editorconfig fails to suppress analyzer warnings #42762
Comments
Note that the VS in-proc compiler seems to do it right -- it doesn't produce these warnings in the error list except right after a full project build, and then when I navigate to those warnings in the editor, they disappear. So it seems it's just a bug in the out of proc (or command line) build. |
Note if I move the content of |
This repros with the very latest compiler as well: <PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="3.6.0-1.final" PrivateAssets="all" /> |
Tagging @agocke |
I think I am running into a similar issue - trying to turn on some of the analyzers for my project. I added the following to . .editorconfig: # CA1827: Do not use Count/LongCount when Any can be used
dotnet_diagnostic.CA1827.severity = error
# CA1829: Use Length/Count property instead of Count() when available
dotnet_diagnostic.CA1829.severity = error
# Default severity for all analyzer diagnostics
dotnet_analyzer_diagnostic.severity = none Edit: It appears this maybe version specific. I get the warnings in VS 16.7, but not in 16.8 Preview 4. Presumably the CI server isn't using a preview VS version, hence not respecting the .editorconfig |
Version Used: .NET Core SDK 3.1.201, VS 16.6.0 Preview 3 (29923.206.master)
Steps to Reproduce:
Expected Behavior:
No warnings for files under the
ext
directory.Actual Behavior:
Many dozens of warnings under the
ext\MessagePack\src\MessagePack.UnityClient\Assetes\Scripts\MessagePack
direcotry.The
ext
folder is where submodules are mounted, and while these add compilation inputs to the C# compiler, we can't hold them to the same style bar that our the parent repo is held to. For this reason, I have anext\.editorconfig
file that turns off all analyzers. But although I can see all the relevant .editorconfig files are passed to the compiler, the analyzers run and produce many warnings anyway.The text was updated successfully, but these errors were encountered: