chore: add pre-commit hook (#21858)

This commit is contained in:
Shuduo Sang 2023-06-27 11:57:31 +08:00 committed by GitHub
parent 9455087d5b
commit 5533db15c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 33 additions and 0 deletions

33
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,33 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: check-json
- id: end-of-file-fixer
- id: trailing-whitespace
repos:
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
repos:
- repo: https://github.com/pocc/pre-commit-hooks
rev: master
hooks:
- id: cppcheck
args: ["--error-exitcode=0"]
repos:
- repo: https://github.com/crate-ci/typos
rev: v1.13.6
hooks:
- id: typos-src
repos:
- repo: https://github.com/TomWright/dasel
rev: v2.3.4
hooks:
- id: dasel-validate