Skip to main content

Analyzer Plugin

DCM can be used as a plugin for the Dart analyzer. All issues produced by rules and anti-patterns will be highlighted in the IDE.

To enable the plugin integration add dart_code_metrics entry to the analyzer plugins list:

analysis_options.yaml
analyzer:
plugins:
- dart_code_metrics

dart_code_metrics: ... # package configuration

Plugin integration supports all IDE that are supported by the analyzer itself.

Applying Quick Fixes

Rules that marked with a has auto-fix badge have auto-fixes available through the IDE context menu. VS Code example:

VS Code example

Troubleshooting the Plugin

If you have a problem with the plugin, refer to the troubleshooting docs.