From 811aaac88d406aa6a9376110109e850abd305974 Mon Sep 17 00:00:00 2001 From: Anis Da Silva Campos Date: Wed, 2 Sep 2020 17:50:52 +0200 Subject: [PATCH] chore(local): add pre-commit hooks --- .pre-commit-config.yaml | 27 +++++++++++++++++++++++++++ local/yamllint_config.yaml | 9 +++++++++ 2 files changed, 36 insertions(+) create mode 100644 .pre-commit-config.yaml create mode 100644 local/yamllint_config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..241bcce --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,27 @@ +--- +repos: + - repo: https://github.com/adrienverge/yamllint.git + rev: v1.24.2 + hooks: + - id: yamllint + args: [-c=./local/yamllint_config.yaml] + + - repo: https://github.com/frnmst/md-toc + rev: master # or a specific git tag from md-toc + hooks: + - id: md-toc + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.0.0 + hooks: + - id: check-added-large-files + - id: check-case-conflict + - id: check-executables-have-shebangs + - id: check-json + - id: check-merge-conflict + - id: check-yaml + - id: debug-statements + - id: check-symlinks + - id: detect-private-key + - id: end-of-file-fixer + - id: trailing-whitespace + exclude: (.github/CODEOWNERS|validator.bats) diff --git a/local/yamllint_config.yaml b/local/yamllint_config.yaml new file mode 100644 index 0000000..62381e2 --- /dev/null +++ b/local/yamllint_config.yaml @@ -0,0 +1,9 @@ +--- +extends: default +ignore: | + .github/workflows/ + venv/ +rules: + line-length: + max: 120 + comments-indentation: disable