Revision 256dd9a9ae8e6f018bf8d156643ffb777e549231 authored by Karsten Rink on 26 April 2023, 14:43:17 UTC, committed by Karsten Rink on 26 April 2023, 14:43:17 UTC
Save raster de See merge request ogs/ogs!4580
.pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md, --markdown-linebreak-ext=pandoc]
exclude: "^ThirdParty/.*|^Tests/Data/.*|^web/static|^Documentation/.vale/.*"
- id: check-added-large-files
args: [--maxkb 1024]
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
exclude: "^scripts/ci/.*|.cmake-format.yaml"
- id: check-toml
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-json
- id: fix-byte-order-marker
exclude: "^Documentation/.vale/.*"
- id: mixed-line-ending
exclude: ".*\\.vtu"
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
exclude: "ThirdParty|LinearMFront/generate_ref.py"
# Run black on markdown notebooks
- repo: https://github.com/mwouts/jupytext
rev: v1.14.5
hooks:
- id: jupytext
args: [--pipe, black]
additional_dependencies:
- black==23.1.0 # Matches black hook
exclude: "web/.*"
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
hooks:
- id: codespell
exclude: 'ThirdParty/.*|Tests/Data/.*|.*\.ya?ml|.*\.bib|^web/content/imprint.md|^GeoLib/IO/XmlIO/OpenGeoSysSTN.xsd|^Applications/FileIO/Legacy/OGSIOVer4.cpp|^scripts/cmake/CPM.cmake|Documentation/.vale/.*'
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
additional_dependencies: ["cmakelang[YAML]"]
args: [--config=.cmake-format.yaml]
exclude: "scripts/cmake/jedbrown/.*|PackagingMacros.cmake|conan.cmake|CPM.cmake|FindFilesystem.cmake|ConanSetup.cmake|Tests.cmake"
- id: cmake-lint
additional_dependencies: ["cmakelang[YAML]"]
exclude: "scripts/cmake/jedbrown/.*|PackagingMacros.cmake|conan.cmake|CPM.cmake|FindFilesystem.cmake|ConanSetup.cmake|BuildExternalProject.cmake"
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.33.0
hooks:
- id: markdownlint
- repo: local
hooks:
- id: git-diff-check
name: Run git diff --check
entry: git diff --check --cached -- ':!*.md' ':!*.pandoc' ':!*.asc' ':!*.dat' ':!*.ts'
language: system
exclude: "ThirdParty/*|Tests/Data/*|web/static/images/xsd"
stages: [commit, manual]
- id: file-extensions
name: Check file extensions
entry: scripts/hooks/pre-commit-file-extensions.sh
language: system
files: '.*\.cpp'
stages: [commit, manual]
- id: git-clang-format
name: git-clang-format
entry: bash -c 'if command -v git-clang-format &> /dev/null; then git clang-format; else exit 0; fi'
language: system
pass_filenames: false
files: \.(h|cpp)$
- id: vale
name: Check spelling with vale
entry: bash -c 'if command -v vale &> /dev/null; then vale sync; VALE_MIN_ALERT_LEVEL=error scripts/ci/helper/run-vale; else exit 0; fi'
pass_filenames: false
language: system
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...