|
| 1 | +--- |
| 2 | +ci: |
| 3 | + # format compatible with commitlint |
| 4 | + autoupdate_commit_msg: "chore: pre-commit autoupdate" |
| 5 | + autoupdate_schedule: monthly |
| 6 | + autofix_commit_msg: | |
| 7 | + chore: auto fixes from pre-commit.com hooks |
| 8 | +
|
| 9 | + for more information, see https://pre-commit.ci |
| 10 | + skip: |
| 11 | + # https://github.com/pre-commit-ci/issues/issues/55 |
| 12 | + - pip-compile |
| 13 | +default_language_version: |
| 14 | + # Needed in order to make pip-compile output predictable. |
| 15 | + python: python3.9 |
| 16 | +repos: |
| 17 | + - repo: https://github.com/pre-commit/mirrors-prettier |
| 18 | + # keep it before yamllint |
| 19 | + rev: "v2.7.1" |
| 20 | + hooks: |
| 21 | + - id: prettier |
| 22 | + additional_dependencies: |
| 23 | + - prettier |
| 24 | + - prettier-plugin-toml |
| 25 | + - repo: https://github.com/pre-commit/pre-commit-hooks.git |
| 26 | + rev: v4.3.0 |
| 27 | + hooks: |
| 28 | + - id: end-of-file-fixer |
| 29 | + - id: trailing-whitespace |
| 30 | + exclude: > |
| 31 | + (?x)^( |
| 32 | + examples/playbooks/(with-skip-tag-id|unicode).yml| |
| 33 | + examples/playbooks/example.yml |
| 34 | + )$ |
| 35 | + - id: mixed-line-ending |
| 36 | + - id: check-byte-order-marker |
| 37 | + - id: check-executables-have-shebangs |
| 38 | + - id: check-merge-conflict |
| 39 | + - id: debug-statements |
| 40 | + language_version: python3 |
| 41 | + - repo: https://github.com/codespell-project/codespell |
| 42 | + rev: v2.1.0 |
| 43 | + hooks: |
| 44 | + - id: codespell |
| 45 | + - repo: https://github.com/adrienverge/yamllint.git |
| 46 | + rev: v1.27.1 |
| 47 | + hooks: |
| 48 | + - id: yamllint |
| 49 | + files: \.(yaml|yml)$ |
| 50 | + types: [file, yaml] |
| 51 | + entry: yamllint --strict |
| 52 | + - repo: https://github.com/PyCQA/isort |
| 53 | + rev: 5.10.1 |
| 54 | + hooks: |
| 55 | + - id: isort |
| 56 | + args: |
| 57 | + # https://github.com/pre-commit/mirrors-isort/issues/9#issuecomment-624404082 |
| 58 | + - --filter-files |
| 59 | + - repo: https://github.com/psf/black |
| 60 | + rev: 22.6.0 |
| 61 | + hooks: |
| 62 | + - id: black |
| 63 | + language_version: python3 |
| 64 | + - repo: https://github.com/pycqa/flake8.git |
| 65 | + rev: 5.0.2 |
| 66 | + hooks: |
| 67 | + - id: flake8 |
| 68 | + language_version: python3 |
| 69 | + additional_dependencies: |
| 70 | + - flake8-2020>=1.6.0 |
| 71 | + - flake8-docstrings>=1.5.0 |
| 72 | + - flake8-pytest-style>=1.2.2 |
| 73 | + - flake8-rst-docstrings>=0.2.3 |
| 74 | + - flake8-rst>=0.8.0 |
| 75 | + - repo: https://github.com/pre-commit/mirrors-mypy |
| 76 | + rev: v0.971 |
| 77 | + hooks: |
| 78 | + - id: mypy |
| 79 | + # empty args needed in order to match mypy cli behavior |
| 80 | + args: ["--strict"] |
| 81 | + additional_dependencies: |
| 82 | + - pytest |
| 83 | + - repo: https://github.com/pycqa/pylint |
| 84 | + rev: v2.14.5 |
| 85 | + hooks: |
| 86 | + - id: pylint |
| 87 | + additional_dependencies: |
| 88 | + - pytest |
| 89 | + # Keep last due to being considerably slower than the others: |
| 90 | + - repo: local |
| 91 | + hooks: |
| 92 | + - id: pip-compile-upgrade |
| 93 | + # To run it execute: `pre-commit run pip-compile-upgrade --hook-stage manual` |
| 94 | + name: Upgrade constraints files and requirements |
| 95 | + files: ^(setup\.py|setup\.cfg|requirements\.txt)$ |
| 96 | + language: python |
| 97 | + entry: python -m piptools compile --upgrade -q --strip-extras --extra test --output-file=requirements.txt setup.cfg |
| 98 | + pass_filenames: false |
| 99 | + stages: |
| 100 | + - manual |
| 101 | + additional_dependencies: |
| 102 | + - pip-tools>=6.8.0 |
| 103 | + - id: pip-compile |
| 104 | + name: Check constraints files and requirements |
| 105 | + files: ^(setup\.py|setup\.cfg|requirements\.txt)$ |
| 106 | + language: python |
| 107 | + entry: python -m piptools compile -q --strip-extras --extra test --output-file=requirements.txt setup.cfg |
| 108 | + pass_filenames: false |
| 109 | + additional_dependencies: |
| 110 | + - pip-tools>=6.8.0 |
0 commit comments