From d2e28fe8098db51899144d78f69c35c07541c2f1 Mon Sep 17 00:00:00 2001 From: Oliver Falk Date: Tue, 14 Sep 2021 15:52:24 +0200 Subject: [PATCH] Add flake and pre commit config --- .flake8 | 6 ++++ .pre-commit-config.yaml | 74 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 .flake8 create mode 100644 .pre-commit-config.yaml diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..71db5a9 --- /dev/null +++ b/.flake8 @@ -0,0 +1,6 @@ +[flake8] +ignore = E501 +max-line-length = 79 +max-complexity = 18 +select = B,C,E,F,W,T4,B9 +exclude = .git,__pycache__,.virtualenv diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..84dd528 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,74 @@ +fail_fast: true +repos: +- repo: meta + hooks: + - id: check-useless-excludes +- repo: https://github.com/pre-commit/mirrors-prettier + rev: v2.4.0 + hooks: + - id: prettier + files: \.(css|js|md|markdown|json) +- repo: https://github.com/python/black + rev: 21.9b0 + hooks: + - id: black +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.0.1 + hooks: + - id: check-added-large-files + - id: check-ast + - id: check-case-conflict + - id: check-executables-have-shebangs + - id: check-json + - id: check-merge-conflict + - id: check-symlinks + - id: check-vcs-permalinks + - id: check-xml + - id: check-yaml + args: + - --unsafe + - id: end-of-file-fixer + - id: fix-encoding-pragma + - id: forbid-new-submodules + - id: no-commit-to-branch + args: + - --branch + - gh-pages + - id: requirements-txt-fixer + - id: sort-simple-yaml + - id: trailing-whitespace +- repo: https://gitlab.com/pycqa/flake8 + rev: 3.9.2 + hooks: + - id: flake8 +- repo: local + hooks: + - id: shfmt + name: shfmt + minimum_pre_commit_version: 2.4.0 + language: golang + additional_dependencies: + - mvdan.cc/sh/v3/cmd/shfmt@v3.1.1 + entry: shfmt + args: + - -w + - -i + - '4' + types: + - shell +- repo: https://github.com/asottile/blacken-docs + rev: v1.11.0 + hooks: + - id: blacken-docs +- repo: https://github.com/hcodes/yaspeller.git + rev: v7.0.0 + hooks: + - id: yaspeller + + types: + - markdown +- repo: https://github.com/kadrach/pre-commit-gitlabci-lint + rev: 22d0495c9894e8b27cc37c2ed5d9a6b46385a44c + hooks: + - id: gitlabci-lint + args: ["https://git.linux-kernel.at"]