petern48 commented on code in PR #2188:
URL: https://github.com/apache/sedona/pull/2188#discussion_r2240680768


##########
.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.

Review Comment:
   It depends since most of the development is in Java (at least for now). I 
still don't quite see how this is particularly useful for Java devs. Does it 
really make a difference if `mvn spotless:apply` doesn't run on your unstaged 
java files? Won't it still run whenever you do finally decide to commit it? 
That's the only time it matters imo.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to