Skip to content

Commit 58d0277

Browse files
update checkstyle to 8.29 (#321)
Signed-off-by: Jinbo Wang <[email protected]>
1 parent d73cd85 commit 58d0277

File tree

6 files changed

+21
-15
lines changed

6 files changed

+21
-15
lines changed

check_style.xml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,23 @@
4040
<property name="message" value="CRLF and CR line endings are prohibited, but this file uses them."/>
4141
</module>
4242

43+
<module name="LineLengthCheck">
44+
<property name="fileExtensions" value="java" />
45+
<!-- Checks if a line is too long. -->
46+
<property name="max" value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.max}" default="160"/>
47+
<property name="severity" value="error"/>
48+
49+
<!--
50+
The default ignore pattern exempts the following elements:
51+
- import statements
52+
- long URLs inside comments
53+
-->
54+
55+
<property name="ignorePattern"
56+
value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.ignorePattern}"
57+
default="^(package .*;\s*)|(import .*;\s*)|( *\* *https?://.*)$"/>
58+
</module>
59+
4360
<module name="TreeWalker">
4461
<!-- Default CheckStyle Whitespace rules seem reasonable to use. -->
4562
<module name="EmptyForIteratorPad"/>
@@ -92,10 +109,6 @@
92109
<property name="allowByTailComment" value="true"/>
93110
<property name="allowNonPrintableEscapes" value="true"/>
94111
</module>
95-
<module name="LineLength">
96-
<property name="max" value="160"/>
97-
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
98-
</module>
99112
<module name="AvoidStarImport"/>
100113
<module name="OneTopLevelClass"/>
101114
<module name="NoLineWrap"/>
@@ -226,6 +239,7 @@
226239
<property name="thirdPartyPackageRegExp" value="^com\."/>
227240
<property name="sortImportsInGroupAlphabetically" value="true"/>
228241
<property name="separateLineBetweenGroups" value="true"/>
242+
<property name="severity" value="info"/>
229243
</module>
230244
<module name="MethodParamPad"/>
231245
<module name="ParenPad"/>
@@ -249,19 +263,16 @@
249263
<property name="forbiddenSummaryFragments"
250264
value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
251265
</module>
252-
<module name="JavadocParagraph"/>
266+
<!-- <module name="JavadocParagraph"/> -->
253267
<module name="AtclauseOrder">
254268
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
255269
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
256270
</module>
257271
<module name="JavadocMethod">
258272
<property name="scope" value="public"/>
259273
<property name="allowMissingParamTags" value="true"/>
260-
<property name="allowMissingThrowsTags" value="true"/>
261274
<property name="allowMissingReturnTag" value="true"/>
262-
<property name="minLineCount" value="2"/>
263275
<property name="allowedAnnotations" value="Override, Test"/>
264-
<property name="allowThrowsTagsForSubclasses" value="true"/>
265276
</module>
266277
<module name="MethodName">
267278
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>

com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/DebugUtility.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,6 @@ public static List<String> parseArguments(String cmdStr) {
545545
return AdapterUtils.isWindows() ? parseArgumentsWindows(cmdStr) : parseArgumentsNonWindows(cmdStr);
546546
}
547547

548-
549548
/**
550549
* Parses the given command line into separate arguments for mac/linux platform.
551550
* This piece of code is mainly copied from
@@ -627,7 +626,6 @@ private static List<String> parseArgumentsNonWindows(String args) {
627626
return result;
628627
}
629628

630-
631629
/**
632630
* Parses the given command line into separate arguments for windows platform.
633631
* This piece of code is mainly copied from

com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/AdapterUtils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ public static DebugException createUserErrorDebugException(String message, Error
263263
return new DebugException(message, errorCode.getId(), true);
264264
}
265265

266-
267266
/**
268267
* Calculate SHA-256 Digest of given string.
269268
* @param content

com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/JdtUtils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ public static boolean isTest(final IClasspathEntry classpathEntry) {
180180
return classpathEntry.isTest();
181181
}
182182

183-
184183
/**
185184
* Compute the possible source containers that the specified project could be associated with.
186185
* <p>

com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/LogUtils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ public final class LogUtils {
2121
private static final Logger logger = Logger.getLogger(Configuration.LOGGER_NAME);
2222
private static final Logger usageDataLogger = Logger.getLogger(Configuration.USAGE_DATA_LOGGER_NAME);
2323

24-
2524
/**
2625
* Initialize logger for logger level and logger handler.
2726
* @param level the logger level for java debugger.

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@
113113
<plugin>
114114
<groupId>org.apache.maven.plugins</groupId>
115115
<artifactId>maven-checkstyle-plugin</artifactId>
116-
<version>2.17</version>
116+
<version>3.1.0</version>
117117
<dependencies>
118118
<dependency>
119119
<groupId>com.puppycrawl.tools</groupId>
120120
<artifactId>checkstyle</artifactId>
121-
<version>8.18</version>
121+
<version>8.29</version>
122122
</dependency>
123123
<dependency>
124124
<groupId>com.github.sevntu-checkstyle</groupId>

0 commit comments

Comments
 (0)