Skip to content
pubscout

remove_from_coverage

2.0.0, released 6 years ago by an unverified publisher

Command-line tool to remove files matching patterns from lcov.info coverage reports.

WASM-ready
$ flutter pub add remove_from_coverage
Source repository

What it does

It reads an lcov.info file (or stdin) and filters out entries whose paths match given regular‑expression patterns. The filtered result is written to stdout (or a new file). This helps exclude generated or unwanted files from coverage metrics.

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

Use it when

  • You need to exclude generated files (e.g., *.g.dart) from coverage reports
  • You work with non‑Dart projects that still produce lcov.info files
  • You want a quick, OS‑agnostic way to post‑process coverage data

Skip it when

  • Your test runner can already exclude files during generation
  • You need real‑time coverage filtering during test execution

Strengths

  • Simple CLI with no extra dependencies
  • Works on Windows, macOS, and Linux
  • Pattern matching via RegExp provides flexible exclusions

Weaknesses

  • Only works after the lcov.info file is generated
  • Limited to regex‑based file path matching
  • No built‑in CI integration

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1

Install with `pub global activate remove_from_coverage` and run via `pub global run` or add to PATH; no native permissions required

remove_from_coverage -f coverage/lcov.info -r '\\.g\\.dart$'

Alternatives

Packages that do the same job and could replace remove_from_coverage.

  • cli_util

    Utilities to help build Dart command-line apps, find the SDK, and display progress.

  • cli_tools

    Utilities for building command‑line interfaces, including argument parsing, analytics, and progress reporting.

  • config

    Typed CLI argument and config file parser with env support

  • icons_launcher

    A command-line tool that simplifies updating your Flutter app launcher icon.

Works with

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