From d32432b65337431bc97cefa17b8b5d200408fd1a Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Tue, 2 Nov 2021 13:05:03 -0700 Subject: [PATCH] Add pre-commit configuration --- .dictionary.txt | 4 ++++ .pre-commit-config.yaml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .dictionary.txt create mode 100644 .pre-commit-config.yaml diff --git a/.dictionary.txt b/.dictionary.txt new file mode 100644 index 0000000000..32171aae5c --- /dev/null +++ b/.dictionary.txt @@ -0,0 +1,4 @@ +ists +commitish +atleast +alpha-numeric diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..b6153f00ad --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,32 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +exclude: docs/_vendor/ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.0.1 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-ast + - id: check-added-large-files + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: mixed-line-ending +- repo: https://github.com/golangci/golangci-lint + rev: v1.43.0 + hooks: + - id: golangci-lint +- repo: https://github.com/codespell-project/codespell + rev: v2.1.0 + hooks: + - id: codespell + args: [--ignore-words=.dictionary.txt] +- repo: https://github.com/asottile/pyupgrade + rev: v2.29.0 + hooks: + - id: pyupgrade +- repo: https://github.com/PyCQA/isort + rev: 5.10.0 + hooks: + - id: isort