pre-commit

This commit is contained in:
grym 2022-01-21 15:21:52 -05:00
parent d84640669e
commit 2490f38087
2 changed files with 27 additions and 0 deletions

2
.gitignore vendored
View File

@ -316,3 +316,5 @@ flycheck_*.el
# End of https://www.toptal.com/developers/gitignore/api/emacs
/venv
/.envrc

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

@ -0,0 +1,25 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
exclude: .*\.(md|json)
- id: end-of-file-fixer
exclude: .*\.(json)
- id: check-yaml
- id: check-added-large-files
args: [--maxkb=5120] # 2 MB
- repo: https://github.com/psf/black
rev: 21.12b0
hooks:
- id: black
name: Formatting
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: Import order
args: ["--profile=black", "./fedmon"]