Skip to main content

Android Studio / IntelliJ Plugin

DCM plugin is responsible for starting the analysis process and displaying analysis errors.

To download the extension, or search DCM in the IntelliJ / AS plugins list.

Plugin Capabilities

All the errors calculated by the analysis process will be displayed in the opened files and the DCM Problems View.

Quick fixes are also available, simply call the quick fix menu on the issue in the opened file.

You can quickly fix all fixable DCM rule issues with the "DCM: Fix All Auto-fixable Problems" IDE command or via a shortcut ⌘ + Shift + S.

DCM Fix All IDE Command

Assists

Wrap with a Custom Widget

Analysis Options Files

If the analysis_options.yaml file is open, the plugin will mark all rules that support additional config with ⚙️ icon.

Analysis options config icons preview

You can also call the code actions menu on each rule to quickly change its severity, disable it or open the rule documentation.

Analysis options code actions preview

Custom Analysis Options Files

Aside from the regular analysis_option.yaml file, you can add a custom config file that matches one of the given patterns

  • starts with analysis_options (e.g. analysis_options.1.1.0.yaml)
  • starts with dcm (e.g. dcm_config.yaml or dcm.yaml)
  • placed inside a folder called dcm (e.g. dcm/config.yaml)

If such a file is referenced by any analysis_option.yaml file, DCM will correctly update configuration changes, validate rule names and display a configuration icon (⚙️) for configurable rules.

However, unlike regular analysis_options.yaml files, code actions are not available.

DCM Problems View

A separate view is used to display the errors, calculated by the analysis process. Several other actions are also available from this view (e.g. restarting the analysis process or calling the quick fix menu for the selected problem).

DCM Problems View

To filter errors by severity, use the filter menu.

DCM Problems View

DCM Status Widget

You can easily see the status of the DCM analysis process in the bottom right corner of the IDE. Clicking on the status widget allows you to call additional actions (e.g. restarting the process or seeing the timeouts for analysis requests).

DCM Status Widget

Available Commands

  1. DCM: Restart Analysis server
  2. DCM: Activate License key
  3. DCM: Share Feedback
  4. DCM: Fix All Auto-fixable Problems
  5. DCM: Format Current File
  6. DCM: Show Issues From Baseline
  7. DCM: Hide Issues From Baseline
  8. DCM: Toggle Unused Code Issues
  9. DCM: Toggle Unused File Issues
  10. DCM: Open Rules Page
  11. DCM: Open Metrics Page

Available Configuration

  1. Dart SDK Path - is detected automatically if listed in PATH, but can be set up explicitly, if another version of the SDK should be used. FVM is also supported, if the project has a .fvm/flutter_sdk symlink - it will be used by the plugin as well.
  2. DCM Executable Path - is detected automatically if listed in PATH, but can be set up explicitly.
  3. Show New Version - Show a notification when there is a new DCM version available.
  4. Show Unused Code - Show unused code in the IDE (exclude-public-api is currently not supported).
  5. Show Unused Files - Show unused files in the IDE (exclude-public-api is currently not supported).
  6. Disable Baseline - Disable baseline and show ignored issues in the IDE.
  7. Analyze Only Opened - Only analyze projects with open files.
  8. Highlight Only Files With Errors - Highlight only files with errors in Project View.

Manually Locating the Dart SDK

If for some reason the Dart SDK was not located automatically (and you have it in your PATH), use the extension configuration to locate it manually.

For a locally installed Flutter SDK, the expected folder is named dart-sdk and is typically located at ...flutter/bin/cache/dart-sdk (where flutter is the Flutter SDK folder).

Alternatively, you can run which dart (or an alternative Windows command) and replace /dart with /cache/dart-sdk.

note

If you are setting the path to the Dart SDK manually, consider reaching out to our support team.

We are interested in supporting as many cases as possible to ultimately reduce the need for manual setup to zero.

Locating Plugin Logs

To find the plugin logs, use this official IntelliJ documentation guide.

All DCM log entries begin with the "com.dcm" prefix.

Ensuring the Entire Team Installs the IDE Plugin

To ensure that your entire team installs the IntelliJ / AS plugin, configure the list of "Required plugins".

Enabling Inline Diagnostics

To have diagnostics appear as text at the end of the line, consider installing an additional IDE plugin (for example, Inspection Lens).

warning

Make sure the installed third-party plugin is not malicious. We are not liable for any damage caused by third-party plugins.

Changelog

See the changelog.