From aa0fa213e360d3832f953b134e001bf1385af339 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Thu, 6 Mar 2025 12:44:25 -0500 Subject: [PATCH] Minor pre-commit-config change (#3251) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 79 +++++++++++-------- platform/android/resources/dot-arrow.svg | 22 +++--- platform/default/resources/default_marker.svg | 20 ++--- 3 files changed, 68 insertions(+), 53 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b95acf3a8c9..c0c2fbd80a6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,41 +1,56 @@ +# 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 + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: - - id: check-yaml - args: [--allow-multiple-documents, --unsafe] - - id: end-of-file-fixer - - 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' -- repo: https://github.com/pre-commit/mirrors-clang-format - rev: v19.1.7 - hooks: - - id: clang-format - files: '.*\.(hpp|cpp|h)' - exclude: 'vendor/.*' -- repo: https://github.com/keith/pre-commit-buildifier - rev: 8.0.1 - 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.55.5" - hooks: - - id: swiftformat - args: [--swiftversion, "5.8"] -- repo: local + - id: check-added-large-files + - id: check-toml + - id: check-yaml + args: [ --allow-multiple-documents, --unsafe ] + - id: end-of-file-fixer + - 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$' + + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v19.1.7 hooks: - - id: rustfmt + - id: clang-format + files: '.*\.(hpp|cpp|h)' + exclude: 'vendor/.*' + + - repo: https://github.com/keith/pre-commit-buildifier + rev: 8.0.1 + 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.55.5" + hooks: + - id: swiftformat + args: [ --swiftversion, "5.8" ] + + - repo: local + hooks: + - id: rustfmt name: rustfmt - entry: bash -c 'cd rustutils && cargo fmt' -- + entry: sh -c 'cd rustutils && cargo fmt --all' language: rust - types: [rust] + types: [ rust ] + ci: # sometimes fails https://github.com/keith/pre-commit-buildifier/issues/13 - skip: [buildifier] + skip: [ buildifier ] autoupdate_schedule: monthly diff --git a/platform/android/resources/dot-arrow.svg b/platform/android/resources/dot-arrow.svg index 4c2841a54b7..676c210f05e 100644 --- a/platform/android/resources/dot-arrow.svg +++ b/platform/android/resources/dot-arrow.svg @@ -1,11 +1,11 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/platform/default/resources/default_marker.svg b/platform/default/resources/default_marker.svg index 08ae2d76d6a..aab418c4209 100644 --- a/platform/default/resources/default_marker.svg +++ b/platform/default/resources/default_marker.svg @@ -1,10 +1,10 @@ - - - - - - - - + + + + + + + +