Skip to content

Commit 06c8f6f

Browse files
committed
feat: add checks.xml with baseline Checkstyle config
1 parent c5e365d commit 06c8f6f

File tree

866 files changed

+3455
-3470
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

866 files changed

+3455
-3470
lines changed

checks.xml

Lines changed: 433 additions & 0 deletions
Large diffs are not rendered by default.

checkstyle-suppressions.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!DOCTYPE suppressions PUBLIC "-//Checkstyle//DTD Suppression DTD//EN" "https://checkstyle.org/dtds/suppressions_1_2.dtd">
2+
<suppressions>
3+
<suppress checks="MissingJavadocMethod" files=".*\.java" />
4+
<suppress checks="HideUtilityClassConstructor" files="org/lzwjava/.*\.java"/>
5+
<suppress checks="DesignForExtension" files="org/lzwjava/.*\.java"/>
6+
</suppressions>

pom.xml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,49 @@
4848
</archive>
4949
</configuration>
5050
</plugin>
51+
<plugin>
52+
<groupId>com.diffplug.spotless</groupId>
53+
<artifactId>spotless-maven-plugin</artifactId>
54+
<version>2.44.5</version>
55+
<configuration>
56+
<java>
57+
<palantirJavaFormat />
58+
</java>
59+
</configuration>
60+
<executions>
61+
<execution>
62+
<goals>
63+
<goal>apply</goal>
64+
</goals>
65+
<phase>compile</phase>
66+
</execution>
67+
</executions>
68+
</plugin>
69+
<plugin>
70+
<groupId>org.apache.maven.plugins</groupId>
71+
<artifactId>maven-checkstyle-plugin</artifactId>
72+
<version>3.6.0</version>
73+
<dependencies>
74+
<dependency>
75+
<groupId>com.puppycrawl.tools</groupId>
76+
<artifactId>checkstyle</artifactId>
77+
<version>10.25.0</version>
78+
</dependency>
79+
</dependencies>
80+
<configuration>
81+
<configLocation>${project.basedir}/checks.xml</configLocation>
82+
<failOnViolation>true</failOnViolation>
83+
</configuration>
84+
<executions>
85+
<execution>
86+
<id>checkstyle-check</id>
87+
<phase>compile</phase>
88+
<goals>
89+
<goal>check</goal>
90+
</goals>
91+
</execution>
92+
</executions>
93+
</plugin>
5194
</plugins>
5295
</build>
5396
</project>

src/main/java/com/lzw/solutions/codeforces/p1003A/Main.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,4 @@ void solve() throws IOException {
5656
}
5757
out.append(String.format("%d\n", mc));
5858
}
59-
60-
}
59+
}

src/main/java/com/lzw/solutions/codeforces/p1030A/Main.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,4 @@ void solve() {
2424
public static void main(String[] args) {
2525
new Main().solve();
2626
}
27-
2827
}

src/main/java/com/lzw/solutions/codeforces/p1077A/Main.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,4 @@ public static void main(String[] args) throws IOException {
4545
m.solve();
4646
m.close();
4747
}
48-
49-
}
48+
}

src/main/java/com/lzw/solutions/codeforces/p1092B/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ void solve() throws IOException {
4848
}
4949
out.append(String.format("%d\n", s));
5050
}
51-
}
51+
}

src/main/java/com/lzw/solutions/codeforces/p1095A/Main.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,4 @@ void solve() throws IOException {
4343
}
4444
out.append(String.format("%s\n", sb));
4545
}
46-
47-
}
46+
}

src/main/java/com/lzw/solutions/codeforces/p1097A/Main.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,4 @@ public static void main(String[] args) throws IOException {
4545
m.solve();
4646
m.close();
4747
}
48-
49-
}
48+
}

src/main/java/com/lzw/solutions/codeforces/p110A/Main.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ public static void main(String[] args) {
2020
System.out.println("NO");
2121
}
2222
}
23-
2423
}

0 commit comments

Comments
 (0)