From 9ac6a6ab964d4f77356376042138fc08d206b5f0 Mon Sep 17 00:00:00 2001 From: Ira Abramov Date: Tue, 15 Oct 2019 14:34:32 +0300 Subject: [PATCH] Enforce some coding standards for the contributers --- .pre-commit-config.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..2443753a --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,35 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +--- +# fail_fast: true +minimum_pre_commit_version: 1.18.1 +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-docstring-first + - id: check-merge-conflict + - id: requirements-txt-fixer + - id: double-quote-string-fixer + - id: forbid-new-submodules + - id: mixed-line-ending + - id: check-added-large-files + - repo: https://github.com/jumanjihouse/pre-commit-hooks + rev: 1.11.0 + hooks: + - id: forbid-binary + - id: git-check # Configure in .gitattributes + - id: git-dirty # Configure in .gitignore + - id: markdownlint # Configure in .mdlrc + - id: shellcheck + - id: shfmt + - repo: https://github.com/Lucas-C/pre-commit-hooks + rev: v1.1.7 + hooks: + # - id: forbid-crlf + - id: remove-crlf + # - id: forbid-tabs + - id: remove-tabs + args: [--whitespaces-count, '2'] # defaults to: 4