Skip to content
pubscout

dlcov

4.2.1, released 5 years ago by an unverified publisher

A CLI tool to verify code coverage thresholds in CI/CD and git hooks.

$ flutter pub add dlcov
Source repository

What it does

It checks if your test code coverage meets a minimum threshold and can block builds if it falls short. It also includes untested files in reports and filters out unwanted files using suffixes, regex, or content patterns.

AI-written summary of version 4.2.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to enforce minimum code coverage thresholds in CI/CD pipelines.
  • You need to include untested files in Flutter code coverage reports for higher accuracy.
  • You want to filter out generated files or specific patterns from coverage metrics.

Skip it when

  • You are looking for an in-app state management or UI component library.

Strengths

  • Blocks app builds when code coverage drops below the defined threshold.
  • Includes untested files that Flutter does not natively track.
  • Provides flexible file exclusion via suffixes, regular expressions, and content patterns.

Weaknesses

  • Requires command-line setup and configuration within CI/CD pipelines or scripts.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2

Activate globally using `pub global activate dlcov` or add as a dev dependency in `pubspec.yaml`.

dlcov --coverage=80 --include-untested-files=true --lcov-gen="flutter test --coverage" --log=true

Alternatives

Packages that do the same job and could replace dlcov.

Works with

Packages commonly used together with dlcov: ones it builds on, ones built on it, and its own family.