dart_coco 1.0.6 dart_coco: ^1.0.6 copied to clipboard
Dart-coco is a simple command line utility providing insights into qulity of the code and generating coverage reports from LCOV file
Dart-CoCo #
Dart-CoCo for Dart is a simple command line utility providing insights into:
- quality of code by using static analysis of the code to calculate cyclomatic complexity value.
- coverage information generated from
lcov.info
file.
How to use #
In pubspec.yaml
add a development dependency:
dev-dependencies:
dart_coco: ^1.0.6
From command line execute:
flutter pub run dart_coco --html
If you run flutter test --coverage
before executing Dart-CoCo, tool will include coverage data gathered inside coverage/lcov.info
Directly from GitHub clone:
git clone https://github.com/alexZaicev/dart-coco.git
cd dart-coco
pub get
dart bin/dart_coco.dart --html -r path/to/lib -o report --lcov path/to/lcov.info
Report example #
Report index.html page:
Coverage report collected from LCOV:
Options #
- --root (-r) - package root containing modules with dart files to analyse
- --output (-o) - report output directory location
- --html - HTML report format
- --json - JSON report format
- --help (-h) - Help page
- --verbose (-v) - Enable detailed logging
- --lcov - path to LCOV coverage report file