tho_ai / .pre-commit-config.yaml
phamson02
init
06eb913
raw
history blame
1.43 kB
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: trailing-whitespace # removes any whitespace at the ends of lines
- id: check-toml # check toml syntax by loading all toml files
- id: check-yaml # check yaml syntax by loading all yaml files
- id: check-json # check-json syntax by loading all json files
- id: check-merge-conflict # check for files with merge conflict strings
args: ["--assume-in-merge"] # and run this check even when not explicitly in a merge
- id: check-added-large-files # check that no "large" files have been added
args: ["--maxkb=10240"] # where large means 10MB+, as in Hugging Face's git server
- id: debug-statements # check for python debug statements (import pdb, breakpoint, etc.)
- id: detect-private-key # checks for private keys (BEGIN X PRIVATE KEY, etc.)
- id: pretty-format-json # cleaner json files
args: ["--autofix"] # automatically
# black for python autoformatting
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
# ruff for Python linting
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: "v0.0.270"
hooks:
- id: ruff
# shellcheck-py for linting shell files
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
hooks:
- id: shellcheck