Skip to content

About

A tool to validate CMake based projects against Best Practices

Resources

Contributing

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

1,074 Commits

Folders and files

Repository files navigation

project_validator

ci codecov

project_validator scores how well a project's engineering practices are actually enforced — tests, analysis, formatting, coverage, dependency checks — by reading its build, CI and tool configuration. It is strict and hard to game, so it can hold people and LLM agents to a real bar: comparing two commits shows exactly what a change weakened.

Its goals:

  • Strict. Few projects score well at first; the bar is real engineering practice.
  • Meaningful and actionable. Every point lost names what to do next.
  • Hard to game. A tool counts only if CI runs it on the product's code and it can fail the build; rules turned off, suppressions and exclusions subtract.
  • Judges only the files presented. It never runs the project's code and needs no token or network.
  • Keeps LLMs (and people) in check. Comparing the scores of two commits shows what a change weakened.
  • Every language counts. Each language in the repository is judged, weighted by its share of the product.
  • For humans too. Terminal, TUI and HTML views.

Installing

pipx install project_validator          # or: python3 -m pip install project_validator
pipx install "project_validator[all]"   # with the console report (rich) and the TUI (textual)

A checkout runs as python3 -m project_validator with Python 3.12+, PyYAML and pathspec (Requirements). Or run it in your browser.

Running

project_validator path/to/project                    # the report, in the terminal
project_validator --html report.html path/to/project # the HTML report, one file
project_validator --explain coverage                 # what a check asks, and why

Each check passes, warns, fails, errors (something that decides it could not be read) or is skipped (it does not apply). The score is the share of the applicable quality gates in place. The report lists where points are lost and the next steps, most valuable first. Exit codes: 0 all passed, 1 a check failed or errored, 2 usage error.

Documentation

Also at cpp-best-practices.github.io/project_validator.

Stability

At 0.x, results change with every release. A flag is removed only after a release that deprecates it; the command's old name, project-validator, still runs for one release. Each JSON output has a version and a schema in project_validator/schemas; format changes are in CHANGELOG.md. The score's version changes whenever the same results would score differently.

About

A tool to validate CMake based projects against Best Practices

Resources

Contributing

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages