58 lines
1.7 KiB
YAML
58 lines
1.7 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/pre-commit/pre-commit-hooks
|
|
rev: v5.0.0
|
|
hooks:
|
|
- id: check-added-large-files
|
|
- id: check-toml
|
|
- id: check-yaml
|
|
args: [ --allow-multiple-documents, --unsafe ]
|
|
- id: end-of-file-fixer
|
|
exclude: 'vendor/.*'
|
|
- id: mixed-line-ending
|
|
args: [ --fix=lf ]
|
|
# these are generated by Gradle
|
|
exclude: 'gradlew\.bat$'
|
|
- id: trailing-whitespace
|
|
# FIXME: these autogenerate files contain trailing whitespace. Need to fix generator.
|
|
exclude: '(platform/android/MapLibreAndroid/src/main/java/org/maplibre/android/(location/LocationIndicatorLayer|style/layers/PropertyFactory)\.java$)|(platform/windows/vendor/.*)|(platform/ios/vendor/.*|vendor/.*)'
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
|
rev: v20.1.8
|
|
hooks:
|
|
- id: clang-format
|
|
files: '.*\.(hpp|cpp|h|mm)'
|
|
exclude: 'vendor/.*'
|
|
|
|
- repo: https://github.com/keith/pre-commit-buildifier
|
|
rev: 8.2.0
|
|
hooks:
|
|
- id: buildifier
|
|
|
|
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
|
|
rev: v1.7.7.23
|
|
hooks:
|
|
- id: actionlint
|
|
additional_dependencies: [ shellcheck-py ]
|
|
|
|
- repo: https://github.com/nicklockwood/SwiftFormat
|
|
rev: "0.57.2"
|
|
hooks:
|
|
- id: swiftformat
|
|
args: [ --swiftversion, "5.8" ]
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: rustfmt
|
|
name: rustfmt
|
|
entry: sh -c 'cd rustutils && cargo fmt --all'
|
|
language: rust
|
|
types: [ rust ]
|
|
|
|
ci:
|
|
# sometimes fails https://github.com/keith/pre-commit-buildifier/issues/13
|
|
skip: [ buildifier ]
|
|
autoupdate_schedule: monthly
|