kou commented on code in PR #40835:
URL: https://github.com/apache/arrow/pull/40835#discussion_r1614897276


##########
java/algorithm/pom.xml:
##########
@@ -50,4 +55,68 @@
 
   <build>
   </build>
+
+  <profiles>
+    <profile>
+      <id>spotless-jdk11+</id>
+      <activation>
+        <jdk>[11,]</jdk>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>com.diffplug.spotless</groupId>
+            <artifactId>spotless-maven-plugin</artifactId>
+            <version>${spotless.version.jdk11}</version>
+            <configuration>
+              <formats>
+                <format>
+                  <!-- configure license for xml files -->
+                  <includes>
+                    <include>pom.xml</include>
+                  </includes>
+                  <licenseHeader>
+                    
<file>${maven.multiModuleProjectDirectory}/java/spotless/asf-xml.license</file>
+                    <delimiter>(&lt;configuration|&lt;project)</delimiter>
+                  </licenseHeader>
+                </format>
+                <format>
+  <!-- configure license for java files -->
+  <includes>
+    <include>**/*.java</include>
+  </includes>
+  <licenseHeader>
+    
<file>${maven.multiModuleProjectDirectory}/java/spotless/asf-java.license</file>
+    <delimiter>package</delimiter>
+  </licenseHeader>
+</format>
+              </formats>

Review Comment:
   Can we integrate spotless with our `.pre-commit-config.yaml`?
   https://github.com/apache/arrow/blob/main/.pre-commit-config.yaml
   
   We can detect format error in our lint CI 
https://github.com/apache/arrow/blob/main/.github/workflows/dev.yml#L38 by 
integrating it with pre-commit.



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