From 2490f380879903b96398406584428857aee101da Mon Sep 17 00:00:00 2001 From: grym Date: Fri, 21 Jan 2022 15:21:52 -0500 Subject: [PATCH] pre-commit --- .gitignore | 2 ++ .pre-commit-config.yaml | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.gitignore b/.gitignore index 572afc3..e264ea7 100644 --- a/.gitignore +++ b/.gitignore @@ -316,3 +316,5 @@ flycheck_*.el # End of https://www.toptal.com/developers/gitignore/api/emacs +/venv +/.envrc diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..60aca8d --- /dev/null +++ b/.pre-commit-config.yaml @@ -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"]