.editorconfig Errors/Warnings only showing for files that are open

Viewed 1040

I set up .editorconfig preferences for naming, and I want to see them for all files in our solution, but Visual Studio (2019 16.4.5) only shows the warnings / errors (as defined) If I have the file open in the editor, not for all occurrences in all files, like I want.

How can I see all occurrences of naming rule violations across all files in the solution?

3 Answers

In the errors list tool window the top right drop down allows you to select "Current Document" which will filter the list to just the file with focus:

enter image description here

verses:

enter image description here

(Note the errors, warnings, and messages counts still show there are other places with issues.)

Also the extension Solution Error Visualizer may be helpful.

In Solution Explorer, right click on your Solution or Project and choose "Analyze and Code Cleanup", then "Run Code Analysis on Solution/Project". This will run the analyzer and show you all the errors/warnings in the whole solution or project.

enter image description here

In Visual Studio go to

Options -> Text Editor -> C# -> Advanced

and check

  • Enable full solution analysis
  • Use .editorconfig compatibility mode

Then restart VS and rebuild solution

Related