#3535th of 43 in Code review and testing
pre-commit-hooks
Collection of file-hygiene and syntax-check hooks for the pre-commit framework
- Stars
- 6.7k
- License
- MIT
- Last commit
- Nov 2026
- Last release
- Aug 2025
- Language
- Python
Missed the latest GitHub check; these facts may be older.
Overview
A set of hooks for pre-commit that run on staged files before a commit. They check JSON, YAML, TOML, XML and Python syntax, detect private keys and AWS credentials, block large files and merge-conflict markers, and fix whitespace, line endings and file endings. Configured through .pre-commit-config.yaml or installed with pip. It has no AI features; it is rule-based commit-time linting.
Who it is for: Developers who want commit-time lint and hygiene checks in their repos
Strengths
- Many single-purpose hooks; enable only the ones you need by hook id
- Several hooks autofix files: whitespace, EOF, line endings, JSON formatting, requirements sorting
- Checks for private keys and AWS credentials before commit
- Also installable standalone with pip install pre-commit-hooks
Weaknesses
- No AI features; rule-based checks only, so it fits this list loosely
- Normal use requires the pre-commit framework
- Several hooks are Python-specific (check-ast, debug-statements, name-tests-test)
- file-contents-sorter removes blank lines and ignores comments
What it needs
- no GPU
- Needs pre-commit, git, git-lfs (optional, >=2.2.1)
Also in Code review and testing
See all 43| Rank | Project | Score |
|---|---|---|
| 1 | playwrightCross-browser automation and end-to-end test framework for Chromium, Firefox and WebKit | 94 out of 100 |
| 2 | nxMonorepo build system with task caching, affected-only runs and CI integration | 93 out of 100 |
| 3 | open-code-reviewGo CLI that reviews Git diffs with an LLM agent and line-level comments | 92 out of 100 |
| #4 | bendDependent-typed language where AI-written code must prove rules in LAWS.bend | 88 out of 100 |
| #5 | maestroYAML-based UI and end-to-end test framework for Android, iOS and web | 88 out of 100 |