anzwdev / al-code-outline

AL Code Outline for Visual Studio Code
MIT License
51 stars 14 forks source link

Idea: Mark disabled rules in Code Analyzers Rules #614

Open NKarolak opened 2 months ago

NKarolak commented 2 months ago

Please refer to https://github.com/microsoft/AL/issues/7787:

We have aligned the rule with the other similar ones (that is DefaultSeverity=Info and IsEnabledByDefault=false).

Please note that we distinguish between a rule being disabled or having its default severity set to Hidden. This distinction can be influenced by several factors, such as performance considerations (since Hidden diagnostics are computed while disabled ones are not) or the diagnostic serving as an entry point for a code action (as Hidden diagnostics still show up on hover).

Some code analyzer rules (such as AA0234) are disabled by default, though their severity is not None, so users must add them to their rulesets in order to enable them.

Hence, it would be helpful if "Show Code Analyzers Rules" would mark disabled rules as such, provided the API allows for that. I'm not sure whether to display them as Severity = None instead.