40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
# See https://pre-commit.com for more information
|
|
# See https://pre-commit.com/hooks.html for more hooks
|
|
repos:
|
|
- repo: https://github.com/dragomirecky/cmake-format-pre-commit-hook
|
|
rev: 'v0.6.0'
|
|
hooks:
|
|
- id: cmake-format # cmake formatter
|
|
files: ^(CMakeLists.*|.*\.cmake|.*\.cmake.in)$
|
|
- repo: https://github.com/pre-commit/mirrors-yapf
|
|
rev: 'v0.27.0'
|
|
hooks:
|
|
- id: yapf # python formatter
|
|
- repo: local
|
|
hooks:
|
|
- id: clang-format
|
|
name: clang-format
|
|
description: This hook automatically checks and reformats changed files using clang-format formatter.
|
|
entry: './.dependencies/clang-format-9.0.0-noext/clang-format'
|
|
language: script
|
|
files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$
|
|
args: ['-i', '-style=file']
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: 'v2.4.0'
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
args: [--markdown-linebreak-ext=md]
|
|
- id: end-of-file-fixer
|
|
- id: mixed-line-ending
|
|
exclude: |
|
|
(?x)(
|
|
^tests/unit/lang/translator/(keys|cs|es|fr|de|pl|it)\.txt$|
|
|
^lib/inih/|
|
|
^lib/Marlin/|
|
|
^lib/Prusa-Error-Codes/|
|
|
^lib/TMCStepper/|
|
|
^lib/Middlewares/Third_Party/LwIP/|
|
|
^lib/jsmn/|
|
|
^lib/Catch2/
|
|
)
|