This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git
The following commit(s) were added to refs/heads/master by this push:
new cb497d2c2d [GH-1643] Add `mvn spotless:apply` as a pre-commit hook
(#2188)
cb497d2c2d is described below
commit cb497d2c2dd0795b797aaa894ff4a4b3e1807abb
Author: John Bampton <[email protected]>
AuthorDate: Tue Jul 29 16:48:26 2025 +1000
[GH-1643] Add `mvn spotless:apply` as a pre-commit hook (#2188)
---
.pre-commit-config.yaml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index a706a6f4d9..06fb02f4ce 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -40,6 +40,19 @@ repos:
files: \.(js|ya?ml)$
language: node
additional_dependencies: ['[email protected]']
+ - id: maven-spotless-apply
+ name: maven spotless apply
+ description: automatically formats Java and Scala code using mvn
spotless:apply.
+ entry: mvn spotless:apply
+ language: system # Indicates that the 'entry' command should be run
directly as a system command.
+ types: [java, scala] # Specifies that this hook should run on Java and
Scala files.
+ pass_filenames:
+ false # Crucial: tells pre-commit NOT to pass filenames as arguments
to 'mvn spotless:apply'.
+ # Spotless typically scans the whole project based on its
configuration.
+ always_run:
+ true # Ensures this hook runs even if no Java files are changed.
+ # This is useful for spotless:apply which might affect files not
staged.
+ stages: [pre-commit] # Specifies that this hook runs during the
'commit' stage.
- id: check-zip-file-is-not-committed
name: check no zip files are committed
description: Zip files are not allowed in the repository