Skip to content

Commit 79db5d8

Browse files
Issue #1068: migrate to checkstyle 11.0.0
1 parent a802a53 commit 79db5d8

File tree

4 files changed

+150
-7
lines changed

4 files changed

+150
-7
lines changed

.circleci/config.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
parameters:
88
image-name:
99
type: string
10-
default: "cimg/openjdk:11.0.18"
10+
default: "cimg/openjdk:21.0.6"
1111
description: "docker image to use"
1212
command:
1313
description: "command to run"
@@ -52,7 +52,6 @@ workflows:
5252
- validate-with-maven-script:
5353
name: "checkstyle-regression"
5454
command: "./.ci/validation.sh checkstyle-regression"
55-
# until https://github.com/sevntu-checkstyle/sevntu.checkstyle/issues/1039
56-
# - validate-with-maven-script:
57-
# name: "eclipse-analysis"
58-
# command: "./.ci/validation.sh eclipse-analysis"
55+
- validate-with-maven-script:
56+
name: "eclipse-analysis"
57+
command: "./.ci/validation.sh eclipse-analysis"

eclipsecs-sevntu-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<properties>
2929
<eclipsecs.version>10.4.0-SNAPSHOT</eclipsecs.version>
3030
<!-- verify time version -->
31-
<checkstyle.version>10.17.0</checkstyle.version>
31+
<checkstyle.version>11.0.0</checkstyle.version>
3232
<checkstyle.configLocation>https://raw.githubusercontent.com/checkstyle/checkstyle/checkstyle-${checkstyle.version}/config/checkstyle-checks.xml</checkstyle.configLocation>
3333
<checkstyle.header>https://raw.githubusercontent.com/checkstyle/checkstyle/master/config/java.header</checkstyle.header>
3434
<checkstyle.regexp.header>https://raw.githubusercontent.com/checkstyle/checkstyle/master/config/java-regexp.header</checkstyle.regexp.header>
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# The list of options supported by Eclipse compiler
2+
# https://github.com/eclipse/eclipse.jdt.core/blame/master/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
3+
4+
org.eclipse.jdt.core.compiler.problem.APILeak=error
5+
org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=error
6+
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
7+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
8+
org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
9+
org.eclipse.jdt.core.compiler.problem.deadCode=error
10+
org.eclipse.jdt.core.compiler.problem.deadCodeInTrivialIfStatement=error
11+
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
12+
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
13+
org.eclipse.jdt.core.compiler.problem.discouragedReference=error
14+
org.eclipse.jdt.core.compiler.problem.emptyStatement=error
15+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
16+
# The severity is set to 'warning', since we need to suppress it in some cases.
17+
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
18+
org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
19+
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
20+
org.eclipse.jdt.core.compiler.problem.fieldHiding=error
21+
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
22+
org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
23+
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
24+
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
25+
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
26+
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
27+
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
28+
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
29+
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
30+
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=error
31+
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=error
32+
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=error
33+
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=error
34+
org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
35+
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
36+
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
37+
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
38+
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
39+
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
40+
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
41+
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
42+
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
43+
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=enabled
44+
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
45+
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
46+
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
47+
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
48+
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
49+
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
50+
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
51+
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
52+
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=error
53+
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=error
54+
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
55+
org.eclipse.jdt.core.compiler.problem.nullReference=error
56+
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
57+
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=error
58+
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
59+
org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
60+
org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=error
61+
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
62+
# The option rawTypeReference is set to warning to allow us suppress it in code for old code
63+
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
64+
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=error
65+
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
66+
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
67+
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
68+
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
69+
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=error
70+
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=error
71+
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
72+
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
73+
org.eclipse.jdt.core.compiler.problem.tasks=enabled
74+
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=error
75+
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
76+
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
77+
# The option uncheckedTypeOperation is set to warning to allow us suppress it in code for old code
78+
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
79+
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
80+
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=error
81+
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
82+
org.eclipse.jdt.core.compiler.problem.uninternedIdentityComparison=enabled
83+
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=error
84+
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=enabled
85+
org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=error
86+
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
87+
org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=error
88+
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
89+
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
90+
org.eclipse.jdt.core.compiler.problem.unusedImport=error
91+
org.eclipse.jdt.core.compiler.problem.unusedLabel=error
92+
org.eclipse.jdt.core.compiler.problem.unusedLocal=error
93+
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=error
94+
org.eclipse.jdt.core.compiler.problem.unusedParameter=error
95+
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
96+
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
97+
org.eclipse.jdt.core.compiler.problem.unusedTypeArgumentsForMethodInvocation=error
98+
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error
99+
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
100+
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
101+
102+
# Ignore section
103+
104+
# Requires us to box and unbox all conversions manually which seems unnecessary.
105+
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
106+
# We can not enforce this rule as we are library and we keep deprecated stuff for some time
107+
org.eclipse.jdt.core.compiler.problem.deprecation=ignore
108+
# Preview features can be enabled be enabled only at source level 14, we are using 8
109+
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
110+
# We don't document the tests. As we cannot exclude them, this check is muted.
111+
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
112+
# We don't document the tests. As we cannot exclude them, this check is muted.
113+
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
114+
# We will not put all String values to resources, it does not make sense in our project
115+
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
116+
# Incompatible with visitToken and similar API.
117+
org.eclipse.jdt.core.compiler.problem.overridingMethodWithoutSuperInvocation=ignore
118+
# Too much complaining about potential null code but tests and pitests don't show anything.
119+
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
120+
# Complains about any resource that leaves a method that isn't closed first.
121+
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
122+
# Too many false positives for methods that should be static but would cause issues.
123+
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
124+
# We should print all errors
125+
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
126+
org.eclipse.jdt.core.compiler.problem.suppressWarnings=disabled
127+
org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=disabled
128+
# Checkstyle doesn't mind synthetic methods.
129+
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
130+
# IntelliJ requires the type casts while this wants it removed.
131+
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
132+
# We have another check that ensures fields have this when necessary.
133+
# This asks for this on all fields.
134+
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
135+
# We should print errors on all throwables
136+
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
137+
# We shouldn't print errors on overriding methods that don't make use of exceptions
138+
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
139+
# We use checkstyle rule, special cases could be suppressed by configs out of code
140+
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
141+
# For an event handler it is not possible to remove unneeded parameter nor use it.
142+
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
143+
# For an event handler it is not possible to remove unneeded parameter nor use it.
144+
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled

sevntu-checks/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<!-- It is compile dependency to checkstyle, this version has to be the same as eclipse-cs depends on -->
1919
<checkstyle.eclipse-cs.version>10.4</checkstyle.eclipse-cs.version>
2020
<!-- verify time version -->
21-
<checkstyle.version>10.17.0</checkstyle.version>
21+
<checkstyle.version>11.0.0</checkstyle.version>
2222
<checkstyle.configLocation>https://raw.githubusercontent.com/checkstyle/checkstyle/checkstyle-${checkstyle.version}/config/checkstyle-checks.xml</checkstyle.configLocation>
2323
<checkstyle.nonMain.configLocation>https://raw.githubusercontent.com/checkstyle/checkstyle/checkstyle-${checkstyle.version}/config/checkstyle-non-main-files-checks.xml</checkstyle.nonMain.configLocation>
2424
<checkstyle.non-main-files-suppressions.file>config/checkstyle-non-main-files-suppressions.xml</checkstyle.non-main-files-suppressions.file>

0 commit comments

Comments
 (0)