X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=.pre-commit-config.yaml;h=734653f2dc41799d8d8be66e33344b7d1cbaaed0;hb=2383cb7b4b50cd660bcbb47b3a2dd5161c53a8c0;hp=275074f2d44a88f5549359bbb11c95cef7806d6a;hpb=884dd2396247ac74162d118a5654b655efd50f48;p=releng%2Fbuilder.git diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 275074f2d..734653f2d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,30 +1,67 @@ --- +default_language_version: + python: python3 + node: "14.13.0" repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.2.1 + rev: v4.0.1 hooks: - id: check-json - - id: flake8 - args: ['--max-line-length=88'] - exclude: docs/* - id: trailing-whitespace + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v2.4.1 + hooks: + - id: prettier + stages: [commit] + - repo: https://github.com/jorisroovers/gitlint - rev: v0.11.0 + rev: v0.16.0 hooks: - id: gitlint + stages: [commit-msg] - repo: https://github.com/jumanjihouse/pre-commit-hooks - sha: 1.11.0 + rev: 2.1.5 hooks: - id: shellcheck exclude: > - (?x)^( - jjb/global-jjb/.*| - jenkins-config/.* - )$ + (?x)^( + jjb/global-jjb/.*| + packer/common-packer/.*| + jenkins-config/.* + )$ + + - repo: https://github.com/ambv/black + rev: 21.10b0 + hooks: + - id: black + + - repo: https://gitlab.com/pycqa/flake8 + rev: 3.9.2 + hooks: + - id: flake8 + args: ["--max-line-length=88"] + + - repo: https://github.com/pycqa/bandit + rev: 1.7.0 + hooks: + - id: bandit + # Bandit does not need to run on test code + exclude: ^tests/ + + - repo: https://github.com/pycqa/pydocstyle + rev: 6.1.1 + hooks: + - id: pydocstyle - repo: https://github.com/adrienverge/yamllint - rev: v1.15.0 + rev: v1.26.3 hooks: - id: yamllint + + - repo: https://github.com/btford/write-good + rev: v1.0.4 + hooks: + - id: write-good + exclude: docs/jenkins.rst