|
| 1 | +--- |
| 2 | +exclude: |
| 3 | + (?x)^( |
| 4 | + __NONE__)$ |
| 5 | +repos: |
| 6 | + - repo: https://github.com/executablebooks/mdformat |
| 7 | + # Do this before other tools "fixing" the line endings |
| 8 | + rev: 0.7.22 |
| 9 | + hooks: |
| 10 | + - id: mdformat |
| 11 | + name: Format Markdown |
| 12 | + stages: [manual] |
| 13 | + entry: mdformat # Executable to run, with fixed options |
| 14 | + language: python |
| 15 | + types: [markdown] |
| 16 | + args: [--wrap, '75', --number] |
| 17 | + additional_dependencies: |
| 18 | + - mdformat-toc |
| 19 | + - mdformat-gfm |
| 20 | + - mdformat-beautysh |
| 21 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 22 | + rev: v5.0.0 |
| 23 | + hooks: |
| 24 | + # - id: no-commit-to-branch |
| 25 | + # args: [--branch, main] |
| 26 | + - id: debug-statements |
| 27 | + - id: end-of-file-fixer |
| 28 | + exclude: ^(tests/.*)$ |
| 29 | + - id: trailing-whitespace |
| 30 | + exclude: ^(tests/.*|.*\.md)$ |
| 31 | + - id: check-json |
| 32 | + - id: mixed-line-ending |
| 33 | + exclude: ^(tests/.*)$ |
| 34 | + - id: check-builtin-literals |
| 35 | + args: [--ignore=dict] |
| 36 | + - id: check-ast |
| 37 | + - id: check-merge-conflict |
| 38 | + - id: check-executables-have-shebangs |
| 39 | + - id: check-shebang-scripts-are-executable |
| 40 | + exclude: ^(test/.*)$ |
| 41 | + - id: check-docstring-first |
| 42 | + - id: fix-byte-order-marker |
| 43 | + exclude: ^(tests/.*)$ |
| 44 | + - id: check-case-conflict |
| 45 | + - id: check-toml |
| 46 | + - repo: https://github.com/lovesegfault/beautysh.git |
| 47 | + rev: v6.2.1 |
| 48 | + hooks: |
| 49 | + - id: beautysh |
| 50 | + args: [--indent-size=4] |
| 51 | + exclude: (?x)^(test/test\..*|config/missing|configure|autogen.sh)$ |
| 52 | + additional_dependencies: |
| 53 | + - setuptools |
| 54 | + - repo: https://github.com/codespell-project/codespell |
| 55 | + rev: v2.4.1 |
| 56 | + hooks: |
| 57 | + - id: codespell |
| 58 | + args: |
| 59 | + - -L |
| 60 | + - secur,te |
| 61 | + # - --toml |
| 62 | + # - pyproject.toml |
| 63 | + additional_dependencies: |
| 64 | + - tomli |
| 65 | + - repo: https://github.com/pocc/pre-commit-hooks |
| 66 | + rev: v1.3.5 |
| 67 | + # Install dependencies on windows: |
| 68 | + # choco install llvm uncrustify cppcheck |
| 69 | + hooks: |
| 70 | + - id: uncrustify |
| 71 | + exclude: ^(tests/.*|documentation/.*)$ |
| 72 | + args: [--replace, --no-backup, -c, uncrustify.cfg] |
| 73 | + - id: cppcheck |
| 74 | + exclude: ^(tests/.*|documentation/.*)$ |
| 75 | + args: |
| 76 | + - --force |
| 77 | + - --language=c |
| 78 | + - --std=c99 |
| 79 | + - -Isrc |
| 80 | + - '--template={file}({line}): {severity} ({id}): {message}' |
| 81 | + - --inline-suppr |
| 82 | + - --check-level=exhaustive |
| 83 | + - --suppress=unusedFunction |
| 84 | + - --suppress=unmatchedSuppression |
| 85 | + - id: cpplint |
| 86 | + exclude: ^(tests/.*|documentation/.*)$ |
| 87 | + args: ["--filter=-build/header_guard,-legal/copyright,-whitespace/indent,-whitespace/newline,-whitespace/braces,-whitespace/comments,-whitespace/line_length,-whitespace/parens,-build/include_order,-readability/todo,-readability/fn_size,-build/include_subdir"] |
| 88 | + additional_dependencies: |
| 89 | + - cpplint>=1.6.1 |
| 90 | + - repo: https://github.com/shellcheck-py/shellcheck-py |
| 91 | + rev: v0.10.0.1 |
| 92 | + hooks: |
| 93 | + - id: shellcheck |
| 94 | + # exclude: (?x)^(__NONE__)$ |
| 95 | + # args: [-x,-e1007,-e1009,-e1072,-e1073] |
0 commit comments