13

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?

2
  • was just wondering the same myself; I see no replies but did you find any information outside of stackoverflow? Dec 29, 2019 at 20:02
  • @ChristopherKing Nothing. wrote my take as answer. Jan 2, 2020 at 8:02

3 Answers 3

9

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.
6
  • Interesting.. that is, contrary to the quoted definition in OP, "silent" is visible to the user;)´´. Go figure. Jun 2, 2021 at 12:17
  • Exactly. I think they meant "non-visible in the Error List". It seems that suggestion/error/warning show up in the editor and Error List; silent shows up only in the editor; and none shows up nowhere. The error list is sometimes out of date, so I'm not totally sure.
    – Vimes
    Jun 2, 2021 at 18:34
  • I don't get the three dots in silent :(
    – kofifus
    Aug 6, 2021 at 0:13
  • This actually makes sense for silent: "The diagnostic is reported to the IDE diagnostic engine", meaning that you see the ... in the IDE, but not in the Error List. It's just not obvious at first what IDE diagnostic engine means.
    – user276648
    Apr 19, 2022 at 8:10
  • See 'Hidden' severity versus 'None' severity, which corresponds to silent vs none.
    – user276648
    Apr 19, 2022 at 8:13
5

Due to lack of better information and until proven wrong, I'm considering them equal for practical effect.

Still, considering this as an opportunity to define a useful semantic difference, I would suggest to:

  • USE none when you object to given rule in chosen scope. This rule is not mandatory to be followed.
  • USE silent for rules which must be followed, but are causing too much noise and are suppressed temporarily while still communicating the desired target state.
4

The distinction is explained in the documentation:

Hidden (silent) severity rules that are enabled by default differ from disabled or None severity rules in certain aspects.

  • If any code fix is registered for a Hidden severity rule, Visual Studio offers the fix as a light bulb code-refactoring action even if the hidden diagnostic isn't visible to the user. The fix isn't offered if the severity rule is disabled as None.
  • Hidden severity rules can be bulk configured by entries that set rule severity of multiple analyzer rules at once in an EditorConfig file. None severity rules can’t be configured this way. Instead, they must be configured through entries that set rule severity in an EditorConfig file for each rule ID.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.