mirror of
https://github.com/fastapi/fastapi.git
synced 2025-12-23 14:19:17 -05:00
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
# See https://pre-commit.com for more information
|
|
# See https://pre-commit.com/hooks.html for more hooks
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v6.0.0
|
|
hooks:
|
|
- id: check-added-large-files
|
|
args: ['--maxkb=750']
|
|
- id: check-toml
|
|
- id: check-yaml
|
|
args:
|
|
- --unsafe
|
|
- id: end-of-file-fixer
|
|
- id: trailing-whitespace
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.14.3
|
|
hooks:
|
|
- id: ruff
|
|
args:
|
|
- --fix
|
|
- id: ruff-format
|
|
- repo: local
|
|
hooks:
|
|
- id: add-permalinks-pages
|
|
language: unsupported
|
|
name: add-permalinks-pages
|
|
entry: uv run ./scripts/docs.py add-permalinks-pages
|
|
args:
|
|
- --update-existing
|
|
files: ^docs/en/docs/.*\.md$
|
|
- id: generate-readme
|
|
language: unsupported
|
|
name: generate README.md from index.md
|
|
entry: uv run ./scripts/docs.py generate-readme
|
|
files: ^docs/en/docs/index\.md|docs/en/data/sponsors\.yml|scripts/docs\.py$
|
|
pass_filenames: false
|
|
- id: update-languages
|
|
language: unsupported
|
|
name: update languages
|
|
entry: uv run ./scripts/docs.py update-languages
|
|
files: ^docs/.*|scripts/docs\.py$
|
|
pass_filenames: false
|
|
- id: ensure-non-translated
|
|
language: unsupported
|
|
name: ensure non-translated files are not modified
|
|
entry: uv run ./scripts/docs.py ensure-non-translated
|
|
files: ^docs/(?!en/).*|^scripts/docs\.py$
|
|
pass_filenames: false
|