[Question] Dart Code Metrics issue should fail a pipeline (flutter analyze)
enseitankad0 opened this issue · 2 comments
enseitankad0 commented
Hi. I started using Dart Code Metrics and I pushed my code to CI/CD with a special code violating one of the DCM metric. I was expected that flutter analyze will throw an error but the whole pipeline passed.
As far I understood I need to run additional command to detect issues and fail a code check pipeline.
flutter pub run dart_code_metrics:metrics analyze lib.
Question is: Why is this step necessary if DCM works as a Flutter Analyzer plugin? Here's my config
analyzer:
exclude: [lib/**.g.dart]
plugins:
- dart_code_metrics
dart_code_metrics:
rules:
- prefer-first
incendial commented
@enseitankad0 hi, dart / flutter analyze doesn't support running the plugins integration, so calling the dcm cli command is necessary.
enseitankad0 commented
@incendial thank you for your quick response. I thought I had a wrong configuration.