gakera
gakera

Reputation: 3677

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

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?

Upvotes: 7

Views: 2474

Answers (3)

Agata
Agata

Reputation: 71

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

Upvotes: 5

Roman Marusyk
Roman Marusyk

Reputation: 24609

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

Upvotes: 3

Richard
Richard

Reputation: 109140

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.

Upvotes: 2

Related Questions