|
| 1 | +# SPDX-FileCopyrightText: none |
| 2 | +# SPDX-License-Identifier: CC0-1.0 |
| 3 | + |
| 4 | +repos: |
| 5 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 6 | + rev: v3.2.0 |
| 7 | + hooks: |
| 8 | + # Forbid files which have a UTF-8 byte-order marker |
| 9 | + - id: check-byte-order-marker |
| 10 | + # Require literal syntax when initializing empty or zero Python builtin types |
| 11 | + - id: check-builtin-literals |
| 12 | + # Check for files that would conflict in case-insensitive filesystems |
| 13 | + - id: check-case-conflict |
| 14 | + # Ensures that (non-binary) executables have a shebang |
| 15 | + - id: check-executables-have-shebangs |
| 16 | + # Check for files that contain merge conflict strings |
| 17 | + - id: check-merge-conflict |
| 18 | + # Checks for symlinks which do not point to anything |
| 19 | + - id: check-symlinks |
| 20 | + # This hook checks yaml files for parseable syntax |
| 21 | + - id: check-yaml |
| 22 | + files: .drone.yml |
| 23 | + # Drone CI config allows and requires multiple documents |
| 24 | + args: [--allow-multiple-documents] |
| 25 | + - id: check-yaml |
| 26 | + exclude: .drone.yml |
| 27 | + # Detects the presence of private keys |
| 28 | + - id: detect-private-key |
| 29 | + # Ensures that a file is either empty, or ends with one newline |
| 30 | + - id: end-of-file-fixer |
| 31 | + exclude: ^tests/(json|response|xml)/ |
| 32 | + # Replaces or checks mixed line ending |
| 33 | + - id: mixed-line-ending |
| 34 | + exclude: ^tests/(json|response|xml)/ |
| 35 | + # This hook trims trailing whitespace |
| 36 | + - id: trailing-whitespace |
| 37 | + exclude: ^tests/(json|response|xml)/ |
| 38 | + |
| 39 | + - repo: https://github.com/pre-commit/pygrep-hooks |
| 40 | + rev: v1.6.0 |
| 41 | + hooks: |
| 42 | + # Enforce that `noqa` annotations always occur with specific codes |
| 43 | + - id: python-check-blanket-noqa |
| 44 | + # Prevent common mistakes of `assert mck.not_called()`, `assert mck.called_once_with(...)` and `mck.assert_called` |
| 45 | + - id: python-check-mock-methods |
| 46 | + # A quick check for the `eval()` built-in function |
| 47 | + - id: python-no-eval |
| 48 | + # A quick check for the deprecated `.warn()` method of python loggers |
| 49 | + - id: python-no-log-warn |
| 50 | + # ToDo: Fix code |
| 51 | + # # Enforce that python3.6+ type annotations are used instead of type comments |
| 52 | + # - id: python-use-type-annotations |
| 53 | + # Detect common mistake of using single backticks when writing rst |
| 54 | + - id: rst-backticks |
| 55 | + # Detect mistake of inline code touching normal text in rst |
| 56 | + - id: rst-inline-touching-normal |
| 57 | + # Forbid files which have a UTF-8 Unicode replacement character |
| 58 | + - id: text-unicode-replacement-char |
| 59 | + |
| 60 | + - repo: https://gitlab.com/pycqa/flake8 |
| 61 | + rev: 3.8.2 |
| 62 | + hooks: |
| 63 | + - id: flake8 |
| 64 | + additional_dependencies: |
| 65 | + - flake8-bugbear |
| 66 | + - flake8-implicit-str-concat |
| 67 | + |
| 68 | + - repo: https://github.com/pre-commit/mirrors-mypy |
| 69 | + rev: v0.782 |
| 70 | + hooks: |
| 71 | + - id: mypy |
| 72 | + args: [--no-strict-optional, --ignore-missing-imports, --allow-untyped-global] |
| 73 | + exclude: ^(docs/) |
| 74 | + |
| 75 | +# # Check for missing licensing and copyright information. |
| 76 | +# # The REUSE helper tool assists with achieving and confirming REUSE compliance. |
| 77 | +# # See: https://reuse.software/ |
| 78 | +# - repo: https://github.com/fsfe/reuse-tool |
| 79 | +# rev: v0.11.1 |
| 80 | +# hooks: |
| 81 | +# - id: reuse |
| 82 | +# exclude: ^tests/(json|response|xml)/ |
0 commit comments