Awesome Reviewers checks + prompts

File hygiene

Cheap checks on files as files: valid syntax for config formats, no merge markers, no trailing whitespace, no oversized or binary blobs.

V1002 technique
tactic Formatting and hygiene
33 of 256 scanned repositories run it (13%)

Sub-techniques

3

IDNameDescription
V1002.001Config syntax validationParse every JSON, YAML and TOML file, and validate the important ones against a schema.
V1002.002Merge marker and whitespace checksReject conflict markers, trailing whitespace and missing final newlines.
V1002.003Large file guardRefuse files above a size limit so binaries go to LFS or object storage.

Craft it

  1. Add pre-commit-hooks with check-yaml, check-json, check-toml, check-merge-conflict and check-added-large-files.
  2. Validate CI and app config against published JSON schemas with check-jsonschema.
  3. Run pre-commit run --all-files in CI so the hooks are not optional.

Reverse engineer it

Signs that a codebase already runs this technique, and where to read how it is configured.

  • A .pre-commit-config.yaml listing pre-commit-hooks ids.
  • A CI job that runs pre-commit run --all-files.
  • A .yamllint or schema files referenced from hooks.

Where the scanned repositories configure it:

  • .pre-commit-config.yaml in 33 repositories
  • .github/workflows/*.yml in 12 repositories
  • Makefile in 1 repositories
  • pyproject.toml in 1 repositories

Detected by the scanner as: File hygiene (invalid json, yaml or toml, merge markers, trailing whitespace, oversized files.)

Open-source packages

3

Tools seen in scans

by repositories that run them

ToolReposCommand seenRuns inDocs
pre-commit-hooks autofix 33 via pre-commit hook end-of-file-fixer pre-commit, ci, local docs

Procedure examples

repositories that run it, most-starred first

RepositoryToolsRuns inEvidence
TheAlgorithms/Python pre-commit-hooks pre-commit, ci .pre-commit-config.yaml ci (pre-commit.ci)
langchain-ai/langchain pre-commit-hooks pre-commit .pre-commit-config.yaml hooks.check-yaml
langflow-ai/langflow pre-commit-hooks pre-commit .pre-commit-config.yaml hooks.check-case-conflict
fastapi/fastapi pre-commit-hooks pre-commit, ci .github/workflows/pre-commit.yml jobs.pre-commit.steps[10]
ggml-org/llama.cpp pre-commit-hooks pre-commit .pre-commit-config.yaml hooks.trailing-whitespace
home-assistant/core pre-commit-hooks pre-commit .pre-commit-config.yaml hooks.check-executables-have-shebangs
python/cpython pre-commit-hooks pre-commit .pre-commit-config.yaml hooks.check-case-conflict
pallets/flask pre-commit-hooks pre-commit, ci, local .github/workflows/pre-commit.yaml jobs.main.steps[4]
browser-use/browser-use pre-commit-hooks pre-commit, ci .github/workflows/lint.yml jobs.lint-style.steps[4]
bmad-code-org/bmad-method pre-commit-hooks pre-commit, ci .github/workflows/quality.yaml jobs.python.steps[4] (Lint, validate, test)
vllm-project/vllm pre-commit-hooks pre-commit .pre-commit-config.yaml hooks.check-json
getsentry/sentry pre-commit-hooks pre-commit .pre-commit-config.yaml hooks.check-case-conflict
apache/airflow pre-commit-hooks pre-commit .pre-commit-config.yaml hooks.check-merge-conflict
astral-sh/ruff pre-commit-hooks pre-commit .pre-commit-config.yaml hooks.check-merge-conflict
python-poetry/poetry pre-commit-hooks pre-commit, ci .pre-commit-config.yaml ci (pre-commit.ci)
celery/celery pre-commit-hooks pre-commit, ci .github/workflows/linter.yml jobs.linter.steps[1] (Run pre-commit)
stanfordnlp/dspy pre-commit-hooks pre-commit .pre-commit-config.yaml hooks.check-yaml
pydantic/pydantic pre-commit-hooks pre-commit, ci .github/workflows/ci.yml jobs.lint.steps[3]
sgl-project/sglang pre-commit-hooks pre-commit, ci .github/workflows/lint.yml jobs.lint.steps[6] (Run pre-commit checks)
SWE-agent/SWE-agent pre-commit-hooks pre-commit, ci .pre-commit-config.yaml ci (pre-commit.ci)
semgrep/semgrep pre-commit-hooks pre-commit, ci .github/workflows/lint.yml jobs.pre-commit.steps[8] (Run pre-commit)
the-pr-agent/pr-agent pre-commit-hooks pre-commit, ci .github/workflows/pre-commit.yml jobs.pre-commit.steps[3]
Unstructured-IO/unstructured pre-commit-hooks pre-commit .pre-commit-config.yaml hooks.check-added-large-files
astral-sh/ty pre-commit-hooks pre-commit .pre-commit-config.yaml hooks.check-merge-conflict
prowler-cloud/prowler pre-commit-hooks pre-commit .pre-commit-config.yaml hooks.check-merge-conflict
awslabs/mcp pre-commit-hooks pre-commit, ci .github/workflows/pre-commit.yml jobs.pre-commit.steps[5]
boto/boto3 pre-commit-hooks pre-commit, ci .github/workflows/lint.yml jobs.lint.steps[2] (Run pre-commit)
bytedance/trae-agent pre-commit-hooks pre-commit, ci, local .github/workflows/pre-commit.yml jobs.pre-commit.steps[4] (Run pre-commit hooks)
bridgecrewio/checkov pre-commit-hooks pre-commit .pre-commit-config.yaml hooks.debug-statements
maximhq/bifrost pre-commit-hooks pre-commit .pre-commit-config.yaml hooks.end-of-file-fixer
Helicone/helicone pre-commit-hooks pre-commit .pre-commit-config.yaml hooks.trailing-whitespace
opengrep/opengrep pre-commit-hooks pre-commit .pre-commit-config.yaml hooks.check-added-large-files
maplibre/maplibre-native pre-commit-hooks pre-commit, ci .pre-commit-config.yaml ci (pre-commit.ci)

Other techniques in Formatting and hygiene