--- # pre-commit is a tool to perform a predefined set of tasks manually and/or # automatically before git commits are made. # # Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level # # Common tasks # # - Run on all files: pre-commit run --all-files # - Register git hooks: pre-commit install --hook-type pre-commit --hook-type pre-push # # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks exclude: ^(docs/doxygen-awesome-theme/|conan\.lock$) repos: # `pre-commit sample-config` default hooks - repo: https://github.com/pre-commit/pre-commit-hooks rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0 hooks: - id: check-added-large-files - id: check-executables-have-shebangs - id: check-shebang-scripts-are-executable - id: end-of-file-fixer - id: trailing-whitespace # Autoformat: YAML, JSON, Markdown, etc. - repo: https://github.com/rbubley/mirrors-prettier rev: 5ba47274f9b181bce26a5150a725577f3c336011 # frozen: v3.6.2 hooks: - id: prettier - repo: https://github.com/igorshubovych/markdownlint-cli rev: 192ad822316c3a22fb3d3cc8aa6eafa0b8488360 # frozen: v0.45.0 hooks: - id: markdownlint-fix exclude: LICENSE.md - repo: https://github.com/hadolint/hadolint rev: 4e697ba704fd23b2409b947a319c19c3ee54d24f # frozen: v2.14.0 hooks: - id: hadolint-docker # hadolint-docker is a special hook that runs hadolint in a Docker container # Docker is not installed in the environment where pre-commit is run stages: [manual] entry: hadolint/hadolint:v2.12.1-beta hadolint - repo: https://github.com/codespell-project/codespell rev: 63c8f8312b7559622c0d82815639671ae42132ac # frozen: v2.4.1 hooks: - id: codespell args: [ --write-changes, --ignore-words=pre-commit-hooks/codespell_ignore.txt, ] # Running some C++ hooks before clang-format # to ensure that the style is consistent. - repo: local hooks: - id: json-in-cpp name: Fix JSON style in C++ entry: pre-commit-hooks/json_in_cpp.py types: [c++] language: python exclude: | (?x)^( tests/unit/etl/SubscriptionSourceTests.cpp| tests/unit/web/ServerTests.cpp| tests/unit/web/impl/ErrorHandlingTests.cpp| tests/unit/web/ng/ServerTests.cpp| tests/unit/web/ng/impl/ErrorHandlingTests.cpp )$ - id: fix-local-includes name: Fix Local Includes entry: pre-commit-hooks/fix-local-includes.sh types: [c++] language: script - repo: https://github.com/pre-commit/mirrors-clang-format rev: 719856d56a62953b8d2839fb9e851f25c3cfeef8 # frozen: v21.1.2 hooks: - id: clang-format args: [--style=file] types: [c++] - repo: https://github.com/cheshirekow/cmake-format-precommit rev: e2c2116d86a80e72e7146a06e68b7c228afc6319 # frozen: v0.6.13 hooks: - id: cmake-format additional_dependencies: [PyYAML] - repo: local hooks: - id: check-no-h-files name: No .h files entry: There should be no .h files in this repository language: fail files: \.h$ - repo: local hooks: - id: gofmt name: Go Format entry: pre-commit-hooks/run-go-fmt.sh types: [go] language: golang description: "Runs `gofmt`, requires golang" - id: check-docs name: Check Doxygen Documentation entry: pre-commit-hooks/check-doxygen-docs.sh types: [text] language: script pass_filenames: false - id: verify-commits name: Verify Commits entry: pre-commit-hooks/verify-commits.sh always_run: true stages: [pre-push] language: script pass_filenames: false