X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=.pre-commit-config.yaml;h=9f5aa4ad1fcaf6f7f3ac474b9010d44d9e8112b8;hb=2da551a76f5733589368c4292c3facc77a802e3e;hp=7ff009625209fc5c8fd6108bdf87910f7020f754;hpb=d3d228364902a5aa5c7ffb0ff8133ce28ebb5f27;p=releng%2Fbuilder.git diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7ff009625..9f5aa4ad1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,11 +4,13 @@ repos: rev: v2.5.0 hooks: - id: check-json - - id: flake8 - args: ['--max-line-length=88'] - exclude: docs/* - id: trailing-whitespace + - repo: https://github.com/prettier/prettier + rev: 2.0.5 + hooks: + - id: prettier + - repo: https://github.com/jorisroovers/gitlint rev: v0.13.1 hooks: @@ -19,12 +21,47 @@ repos: hooks: - id: shellcheck exclude: > - (?x)^( - jjb/global-jjb/.*| - jenkins-config/.* - )$ + (?x)^( + jjb/global-jjb/.*| + jenkins-config/.* + )$ + + - repo: https://github.com/ambv/black + rev: stable + hooks: + - id: black + + - repo: https://gitlab.com/pycqa/flake8 + rev: 3.8.3 + hooks: + - id: flake8 + args: ["--max-line-length=88"] + + - repo: https://github.com/pycqa/bandit + rev: 1.6.2 + hooks: + - id: bandit + # Bandit does not need to run on test code + exclude: tests/* + + - repo: https://github.com/pycqa/pydocstyle + rev: 5.0.2 + hooks: + - id: pydocstyle - repo: https://github.com/adrienverge/yamllint rev: v1.23.0 hooks: - id: yamllint + + - repo: local + hooks: + # TODO: Switch to upstream hook when https://github.com/btford/write-good/pull/119 is merged. + - id: write-good + name: write-good + description: Check docs for English prose with write-good + entry: write-good + language: node + files: "\\.(rst|md|markdown|mdown|mkdn)$" + additional_dependencies: ["write-good"] + exclude: docs/jenkins.rst