Skip to content
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

OmniSharp isn't picking up FxCop Analyzer settings in top-level .editorconfig #1764

Closed
alexrp opened this issue Apr 13, 2020 · 3 comments
Closed

Comments

@alexrp
Copy link

alexrp commented Apr 13, 2020

(VS Code 1.44.0 / OmniSharp 1.34.15)

In my top-level .editorconfig, I have:

[*.cs]
dotnet_diagnostic.ca2007.severity = none

And in my ´omnisharp.json`:

{
  "FormattingOptions": {
    "EnableEditorConfigSupport": true
  },
  "RoslynExtensionsOptions": {
    "EnableAnalyzersSupport": true
  }
}

When I run dotnet build, CA2007 is indeed disabled as expected. However, in VS Code, I still see CA2007 warnings. I'm not sure whether this is a bug or I'm just doing something wrong.

@filipw
Copy link
Member

filipw commented Apr 13, 2020

There is no support for that at the moment.
It's already tracked in a separate issue though #1657 (comment)

@alexrp
Copy link
Author

alexrp commented Apr 13, 2020

Is there at least a way to disable analyzers pulled in from NuGet?

As it stands, EnableAnalyzersSupport=false seems to disable absolutely everything, including IDE* analyzers. But setting EnableAnalyzersSupport=true is near-unusable due to all the false positives that show up due to OmniSharp not picking up .editorconfig for analyzers from NuGet.

@filipw
Copy link
Member

filipw commented Apr 14, 2020

yes, you can create a ruleset file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants