Thanks for your interest in contributing. This document covers how to set up the project, run tests, and submit changes.
Prerequisites: Node.js 20+, VS Code 1.90+
git clone https://github.com/kool7/coverage-visualizer.git
cd coverage-visualizer
npm install
npm run compilePress F5 in VS Code to open the Extension Development Host with the extension loaded.
src/
extension.ts # Entry point — commands, decorations, watchers
config.ts # All settings in one place
parsers/ # Format parsers (JSON, XML, SQLite)
providers/ # VS Code language feature providers (CodeLens, Hover, Tree)
ui/ # Status bar and WebView dashboard
tests/
coverageParser.test.ts
fixtures/ # Static test data (coverage.json, coverage.xml, .coverage)
__mocks__/vscode.ts # Jest mock for the vscode module
scripts/
generate-test-coverage-db.mjs # Regenerates tests/fixtures/.coverage
npm run compile # TypeScript → out/
npm run watch # Recompile on save
npm test # Run Jest suite
npm run test:watch # Run tests in watch mode
npm run lint # ESLintnpx jest --testNamePattern "parseCoverageJson"The .coverage SQLite fixture is generated by a script (so it doesn't require Python):
node scripts/generate-test-coverage-db.mjs
cp demo-python-project/.coverage tests/fixtures/.coverageRun this whenever you change the data in demo-python-project/src/.
- Add a
parseXxx(input: ...) : CoverageReportfunction insrc/parsers/coverageParser.ts - Add the format detection in
detectAndParse()insidesrc/extension.ts - Add a file watcher pattern in
setupWatchers()insidesrc/extension.ts - Add tests in
tests/coverageParser.test.tswith a fixture file intests/fixtures/
- Keep PRs focused — one feature or fix per PR
- All existing tests must pass (
npm test) - Add tests for new parser logic or bug fixes
- Run
npm run compilebefore opening a PR — type errors block CI - Write a clear PR description explaining what changed and why
Open an issue on GitHub with:
- VS Code version
- Extension version
- Which coverage format you were using
- The error message (from the VS Code Output panel → Coverage Visualizer)
- A minimal reproduction if possible