Disabling a Diagnostic

Ce document est disponible en français

A diagnostic you do not want to see can be turned off by its code. RDCore then stops reporting it, and the analyzer that finds it skips that work. The codes you disable are a setting of yours, Analysis.DisabledDiagnostics, and apply to every workspace you open.

The diagnostics of the RDCore analyzers (RDC) and of an extension's analyzers can be disabled. A compile error (VBC) or a run-time error (VBR, VBA) cannot: code that has one does not compile, or stops when it runs, whatever the settings say.

With a quick fix

A diagnostic that can be disabled comes with a quick fix, after its other fixes: Disable RDC01001 in every workspace. Choosing it adds the code to your list. In the shell, DUCKY offers it with the other actions for a line; in an editor, it is one of the diagnostic's quick fixes.

With CONFIG

CONFIG sets the whole list at once, as codes separated by commas:

CONFIG Analysis.DisabledDiagnostics RDC01001, RDC01002
  • CONFIG Analysis.DisabledDiagnostics shows the codes you disabled.
  • To enable one code again, set the list without it.
  • CONFIG RESET Analysis.DisabledDiagnostics enables them all again.

A code that cannot be disabled is refused. rdc config sets the same list from a command line.

When it takes effect

At once, while the platform runs: the next analysis of a document leaves the disabled codes out, and the diagnostics already shown are refreshed. A list set with rdc config, with no platform running, applies when the platform next starts.

Note

Not implemented. A diagnostic cannot be disabled for one workspace only.

See Diagnostics for the codes, and RD-VBAL §2.3.3 Configuration for the setting.


ACCUEIL • HOME | ℹ️ BIENVENUE • WELCOME | 🧩 BÂTISSONS • BUILD | RD-VBAL | SDK | 🌐 rubberduckvba.ca