Search code examples
visual-studiocode-analysisroslyn-code-analysis

When to use `silent` code analysis severity?


Analyzer feedback severity levels are explained in the documentation. But in my eyes silent and none severity levels seem both to have the same meaning - "I don't want this rule checked for":

For none:

Suppressed completely.

For silent:

Non-visible to user. The diagnostic is reported to the IDE diagnostic engine, however.

What exactly is the effect of "reporting to IDE" for VS2019 and in what scenarios should one prefer silent over none?


Solution

  • I think silent shows up in the editor as the "three dots" or ghosted text, while none doesn't show up. I might recall this not behaving consistently in the past, but it seems to happen in Visual Studio 16.10.0. I like Imre's suggestions.

    enter image description here

    It seems like:

    • suggestion, error, and warning show up in the editor and Error List.
    • silent shows up only in the editor.
    • none shows up in neither.