Skip to content

Flutter Isolated Reporter is a focused CLI utility for extracting a single file's coverage details from a global LCOV report. It is designed for fast feedback while you are working on a specific file, without digging through the full project report.

Notifications You must be signed in to change notification settings

muric-dev/flutter_isolated_reporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter Isolated Reporter (FIR)

codecov CI

Flutter Isolated Reporter is a focused CLI utility for extracting a single file's coverage details from a global LCOV report. It is designed for fast feedback while you are working on a specific file, without digging through the full project report.

Features

  • Isolates one file's LCOV record by file name or full path.
  • Prints a concise line coverage summary to stdout.
  • Optional HTML report generation via genhtml for visual review.
  • Clean CLI output suited for local use and CI logs.

Requirements

  • Python 3.8+
  • click (installed via package dependencies)
  • genhtml for HTML output (part of the lcov toolkit)
    • macOS: brew install lcov
    • Windows (Chocolatey): choco install lcov

Usage

Quick check (default coverage/lcov.info)

fir my_widget.dart

Specify LCOV path

fir --input coverage/lcov.info my_widget.dart

Generate HTML for one file

fir my_widget.dart --html

HTML + All Tests dashboard (copy/paste ready)

flutter test --coverage --machine > coverage/test_results.json
fir my_widget.dart --html --exporter --test-results coverage/test_results.json

Same, with an explicit LCOV path

flutter test --coverage --machine > coverage/test_results.json
fir my_widget.dart --html --exporter --test-results coverage/test_results.json --input coverage/lcov.info

Install Globally

Add the user-level bin directory to PATH so a pip install --user . exposes fir everywhere.

macOS/Linux: add PATH and install

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc   # zsh
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc # bash
python3 -m pip install --user .
command -v fir

Windows (PowerShell)

# Add user Scripts dir to PATH for this session
$env:Path += ";$HOME\AppData\Roaming\Python\Scripts"
# Persist it for future sessions
[Environment]::SetEnvironmentVariable('Path', "$env:Path;${HOME}\AppData\Roaming\Python\Scripts", 'User')
# Install
python -m pip install --user .
# Verify
Get-Command fir

Install Locally (development)

  1. Clone and enter the project
git clone https://github.com/muricdev/flutter_isolated_reporter.git
cd flutter_isolated_reporter
  1. Create and activate a virtualenv
python3 -m venv .venv
source .venv/bin/activate
  1. Upgrade pip and install in editable mode
python3 -m pip install --upgrade pip
python3 -m pip install -e .
  1. (Optional) Install lcov for HTML output
brew install lcov            # macOS
sudo apt install lcov        # Debian/Ubuntu
  1. Verify the CLI is available
fir --help

For development extras (tests, coverage):

python3 -m pip install -e '.[dev]'

About

Flutter Isolated Reporter is a focused CLI utility for extracting a single file's coverage details from a global LCOV report. It is designed for fast feedback while you are working on a specific file, without digging through the full project report.

Resources

Stars

Watchers

Forks

Packages

No packages published