#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
Also in Code review and testing
RankProjectScore
1playwrightCross-browser automation and end-to-end test framework for Chromium, Firefox and WebKit100k stars+2,481 (+2.5%) in 30 daysApache-2.094 out of 100
2nxMonorepo build system with task caching, affected-only runs and CI integration29.5k starsMIT93 out of 100
3open-code-reviewGo CLI that reviews Git diffs with an LLM agent and line-level comments50k stars+3,413 (+7.3%) in 30 daysApache-2.092 out of 100
#4bendDependent-typed language where AI-written code must prove rules in LAWS.bend Live demo ↗ (opens in a new tab)25k starsApache-2.088 out of 100
#5maestroYAML-based UI and end-to-end test framework for Android, iOS and web16.4k starsApache-2.088 out of 100