Skip to main content

Quick Start

This quick start will help you set up DCM quickly but doesn't cover all edge cases. We recommend following the full Getting Started steps to get more comprehensive information and details but if you need to speed up, here are the steps.

Step 1: Installation​

Use Chocolatey to install DCM:

choco install dcm

For a specific version:

choco install dcm --version 1.15.0

Step 2: Setup IDE​

Integrate DCM with your IDE to benefit from real-time code analysis and suggestions.

Step 3: License Activation​

Activate your DCM license to unlock full functionality:

dcm activate --license-key=YOUR_KEY

Step 4: Integration​

Enable recommended rules in your analysis_options.yaml:

dart_code_metrics:
extends:
- recommended

Step 5 (Optional): Migration​

If migrating from the plugin version, follow these steps:

  1. Remove DCM as a package dependency.

  2. Update the analysis_options.yaml file to remove DCM from the plugins section.

  3. Use the new command:

    dcm analyze lib
  4. Update CI/CD configurations to use the dcm executable.

Step 6: Learn More​

Explore further resources to fully utilize DCM: