Dart Code Metrics
Dart Code Metrics is a static analysis tool that helps you analyse and improve your code quality.
Quick start
Analyzer plugin
A plugin for the Dart analyzer
package providing additional rules from Dart Code Metrics. All issues produced by rules or anti-patterns will be highlighted in IDE.
-
Install package as a dev dependency
OR
add it manually to
pubspec.yaml
and then run
-
Add configuration to
analysis_options.yaml
-
Reload IDE to allow the analyzer to discover the plugin
CLI
The package can be used as a command-line tool.
It will produce a result in one of the supported formats:
- Console
- GitHub
- Codeclimate
- HTML
- JSON
Usage
Install the package as listed in the Analyzer plugin usage example.
If you want the command-line tool to check rules, you should configure rules
entry in the analysis_options.yaml
first.
Multi-package repositories usage
If you use Melos, you can add custom command to melos.yaml
.