Step 5 (Optional): Migration
If you are migrating from the dart_code_metrics plugin, follow these steps:
Migration Steps
-
Remove DCM as a Package Dependency
- Open your
pubspec.yaml
file. - Locate the
dart_code_metrics
dependency and remove it. - Run
dart pub get
to update your dependencies.
- Open your
-
Update
analysis_options.yaml
- Open your
analysis_options.yaml
file. - Remove any references to DCM in the
plugins
section. - All other configurations in this file can remain unchanged.
- Open your
-
Update Analysis Command
-
Previously, you might have run DCM using the following command:
dart pub run dart_code_metrics:metrics analyze lib
-
Replace it with the new command:
dcm analyze lib
-
-
Update CI/CD Configuration
- Ensure that your CI/CD pipelines are updated to use the DCM executable.
- Replace any old commands with the new
dcm
command to maintain continuous integration and delivery processes.
Feedback and Support
If you encounter any issues or have feedback about the migration process or the tool, please reach out to us. You can join our Discord server to connect with the community and get support, or send us a message.