Skip to content

Commit 6cced03

Browse files
committed
Improve Spotless integration
1 parent 9545660 commit 6cced03

File tree

2 files changed

+71
-46
lines changed

2 files changed

+71
-46
lines changed

pom.xml

+55-46
Original file line numberDiff line numberDiff line change
@@ -206,54 +206,63 @@
206206
</executions>
207207
</plugin>
208208

209-
<!-- Configuration here must match the one in `.editorconfig`! -->
210-
<plugin>
211-
<groupId>com.diffplug.spotless</groupId>
212-
<artifactId>spotless-maven-plugin</artifactId>
213-
<executions>
214-
<execution>
215-
<id>default-spotless</id>
216-
<phase>verify</phase>
217-
<goals>
218-
<goal>check</goal>
219-
</goals>
220-
</execution>
221-
</executions>
222-
<configuration>
223-
<ratchetFrom>HEAD~31</ratchetFrom>
224-
<java>
225-
<importOrder>
226-
<order>java,javax,org.apache.logging,,\#java,\#javax,\#org.apache.logging,\#</order>
227-
</importOrder>
228-
</java>
229-
</configuration>
230-
</plugin>
209+
<!-- Configuration here must match the one in `.editorconfig`! -->
210+
<plugin>
211+
<groupId>com.diffplug.spotless</groupId>
212+
<artifactId>spotless-maven-plugin</artifactId>
213+
<executions>
214+
<execution>
215+
<id>default-spotless</id>
216+
<phase>verify</phase>
217+
<goals>
218+
<goal>check</goal>
219+
</goals>
220+
</execution>
221+
</executions>
222+
<configuration>
223+
<java>
224+
<licenseHeader>
225+
<file>${maven.multiModuleProjectDirectory}/spotless-license-header.txt</file>
226+
</licenseHeader>
227+
<trimTrailingWhitespace/>
228+
<endWithNewline/>
229+
<removeUnusedImports/>
230+
<indent>
231+
<spaces>true</spaces>
232+
<spacesPerTab>4</spacesPerTab>
233+
</indent>
234+
<importOrder>
235+
<order>java,javax,org.apache.logging,,\#java,\#javax,\#org.apache.logging,\#</order>
236+
</importOrder>
237+
</java>
238+
</configuration>
239+
</plugin>
231240

232-
<plugin>
233-
<groupId>com.github.spotbugs</groupId>
234-
<artifactId>spotbugs-maven-plugin</artifactId>
235-
<executions>
236-
<execution>
237-
<id>default-spotbugs</id>
238-
<phase>verify</phase>
239-
<goals>
240-
<goal>check</goal>
241-
</goals>
242-
</execution>
243-
</executions>
244-
<configuration>
245-
<plugins>
246-
<plugin>
247-
<groupId>com.h3xstream.findsecbugs</groupId>
248-
<artifactId>findsecbugs-plugin</artifactId>
249-
<version>${findsecbugs-plugin.version}</version>
250-
</plugin>
251-
</plugins>
252-
</configuration>
253-
</plugin>
241+
<plugin>
242+
<groupId>com.github.spotbugs</groupId>
243+
<artifactId>spotbugs-maven-plugin</artifactId>
244+
<executions>
245+
<execution>
246+
<id>default-spotbugs</id>
247+
<phase>verify</phase>
248+
<goals>
249+
<goal>check</goal>
250+
</goals>
251+
</execution>
252+
</executions>
253+
<configuration>
254+
<plugins>
255+
<plugin>
256+
<groupId>com.h3xstream.findsecbugs</groupId>
257+
<artifactId>findsecbugs-plugin</artifactId>
258+
<version>${findsecbugs-plugin.version}</version>
259+
</plugin>
260+
</plugins>
261+
</configuration>
262+
</plugin>
254263

255-
</plugins>
264+
</plugins>
256265

257-
</build>
266+
</build>
258267

259268
</project>

spotless-license-header.txt

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache license, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the license for the specific language governing permissions and
15+
* limitations under the license.
16+
*/

0 commit comments

Comments
 (0)