← 全部工具

codeowners-audit

热度 65 更新于 测试与安全

Generate an HTML report for CODEOWNERS ownership gaps and run in CI or from the CLI to fail when files are not covered.

npmauto-collected

安装

npm
npm install -g codeowners-audit

通过 npm 安装。

<p align="center" <img width="328" height="300" alt="codeowners-audit logo" src="https://github.com/user-attachments/assets/ae21c52c-e923-4c43-8a13-8d22e03bc867" / </p

<p align="center"Generate a polished, interactive HTML report for CODEOWNERS coverage, ownership gaps, and GitHub-parity validation. Run it locally for investigation or in CI to fail when files are uncovered.</p

<img width="1429" height="681" alt="image" src="https://github.com/user-attachments/assets/abcaddf1-4159-4278-b592-ce96a1235f8e" /

Live Example

See how ownership coverage looks in practice with this interactive report for the nodejs/node repository.

Why this exists

CODEOWNERS is great for review routing, but it is hard to quickly answer:

  • How much of this repository is actually covered?
  • Which directories have the biggest ownership gaps?
  • Which specific files have no matching owner rule?
  • Which CODEOWNERS rules look valid in git, but are ignored or ineffective on GitHub?

codeowners-audit scans a repository, applies practical CODEOWNERS resolution, and produces a single self-contained HTML report you can open locally, archive in CI, or upload to a public link.

Highlights

  • Self-contained interactive HTML report
  • Coverage drill-down by repository, directory, file, and resolved owner
  • CI-friendly defaults that can fail builds when files are uncovered
  • GitHub-parity validation for ignored CODEOWNERS files, missing paths, invalid owners, oversized files, and fragile coverage
  • Optional team suggestions for uncovered directories based on git history
  • Works on local repositories or remote GitHub repositories with a single command

Quick Start

Run without installing:

npx codeowners-audit

For repeat use in a repository or CI, add it as a dev dependency:

npm install --save-dev codeowners-audit

Common first runs:

Generate a report for the current repository: