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


##########
.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:
   @jbampton Could you elaborate on what you meant by this? I'm getting some 
noticeable delays (up to ~2-3 seconds) on my commits now even when I'm purely 
working in Python and no Java.



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