You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closes#27.
Generates a coverage.py-style report directory: an index page plus one
annotated source page per file, with syntax highlighting and per-line
run/missing/partial marking. --out names the output directory (default
htmlcov/); HTML is never written to stdout.
Repeat runs are incremental: status.json records a hash of each file's
source, its coverage data and its prev/next navigation, so unchanged
pages are not rewritten. A page that was deleted by hand is regenerated
rather than skipped.
Adapted from coverage.py (Apache-2.0) -- templite.py, phystokens.py and
the htmlfiles/ assets are ports; see NOTICE. Departures from it:
- Line categories are pln/run/mis/par only. Excluded lines are removed
from the coverage data before reporting, so there is nothing for an
"excluded" category or column to show.
- A source file missing at report time renders a notice and keeps its
index row, rather than omitting the file or aborting the report --
this is the common case after --merge of coverage produced elsewhere.
- The per-file hash includes prev/next navigation, so adding a file
refreshes its neighbours' links instead of leaving them stale.
- status.json is written atomically (tmp + rename); a truncated one
still self-heals into a full regeneration.
- The index footer keeps the report's own totals when no row is
filtered out, so --skip-covered cannot show a footer that disagrees
with the header percentage.
Under --format=html a forked child returns from the atexit handler
without writing, so two processes cannot interleave into one directory.
Other formats are untouched.
No new dependencies: highlighting uses stdlib tokenize.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
help="select HTML output (shortcut for --format=html)")
217
245
ap.add_argument('--lcov-test-name', type=str, help="test name for LCOV TN: entries")
218
246
ap.add_argument('--lcov-comment', action='append', dest='lcov_comments', help="add comment lines at the beginning of LCOV output (can be used multiple times)")
0 commit comments