Note: If the plugin is analyzing files it should not analyze (like .dart_tool/
or an external package source code), please create an issue, it's most likely a bug.
If the plugin is not working as you'd expect it to work, please consider going through the following steps before creating an issue:
-
Check that the plugin is added to an
analyzer
entry in theanalysis_options.yaml
as described in the Configuration section. -
Check that the
dart_code_metrics
entry in theanalysis_options.yaml
is configured correctly. Note, that you need to add each rule or metric you want to be checked to the config and there is no default rule or metric lists config. Note: for a rule config there is a 4 spaces / 2 tabs indentation. -
Check that the
dart_code_metrics
package is added as a dev dependency to the same package, where the plugin entry added to theanalysis_options.yaml
. If you use a separate sub package for an analyzer configuration, please follow this discussion. -
Restart the IDE to invalidate the cache and check if the issue remains.
-
Open Analyzer Diagnostics and check that the plugin is active. To do that:
-
For VS Code: open the command palette (
Ctrl+Shift+P
orCmd+Shift+P
) and invokeDart: Open Analyzer Diagnostics
. -
For Android Studio (or any other JetBrains IDE): open the
Dart Analysis
tab, clickAnalyzer settings
and then clickView analyzer diagnostics
.
then a
Analyzer Server Diagnostics
webpage will be opened.To check that the plugin is active, open the
Plugins
tab and ensure that there is no errors.If there is an error or the plugin is still not working as expected, please create an issue with the
Plugins
page screenshot, it will be very useful for an investigation. -