Skip to content

Commit 95ceba1

Browse files
committed
mapstruct#2016 Update Checkstyle to 8.29
Adapt checkstyle configuration with new changes: * Move cacheFile to Checker module * Move LineLength to Checker module * Use SuppressWithPlainTextCommentFilter
1 parent 58da2d2 commit 95ceba1

File tree

43 files changed

+14
-52
lines changed

Some content is hidden

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

43 files changed

+14
-52
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ test-output
2323

2424
# Misc.
2525
.DS_Store
26+
checkstyle.cache

build-config/src/main/resources/build-config/checkstyle.xml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
<property name="basedir" value="${basedir}"/>
1616
-->
1717

18+
<property name="cacheFile" value="${checkstyle.cache.file}"/>
19+
1820
<!-- Checks that each Java package has a Javadoc file used for commenting. -->
1921
<!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
2022
<!--
@@ -29,6 +31,13 @@
2931

3032
<module name="FileLength"/>
3133

34+
<module name="LineLength">
35+
<property name="max" value="150"/>
36+
<property name="fileExtensions" value="java" />
37+
</module>
38+
39+
<module name="SuppressWithPlainTextCommentFilter"/>
40+
3241
<!-- Following interprets the header file as regular expressions. -->
3342
<!-- <module name="RegexpHeader"/> -->
3443

@@ -60,8 +69,6 @@
6069

6170
<module name="TreeWalker">
6271

63-
<property name="cacheFile" value="${checkstyle.cache.file}"/>
64-
6572
<module name="SuppressWarningsHolder"/>
6673

6774
<!-- Checks for Javadoc comments. -->
@@ -115,9 +122,6 @@
115122

116123
<!-- Checks for Size Violations. -->
117124
<!-- See http://checkstyle.sf.net/config_sizes.html -->
118-
<module name="LineLength">
119-
<property name="max" value="120"/>
120-
</module>
121125
<module name="MethodLength"/>
122126
<module name="ParameterNumber">
123127
<property name="max" value="10"/>

parent/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<org.apache.maven.plugins.javadoc.version>3.1.0</org.apache.maven.plugins.javadoc.version>
2929
<org.springframework.version>4.0.3.RELEASE</org.springframework.version>
3030
<org.eclipse.tycho.compiler-jdt.version>0.26.0</org.eclipse.tycho.compiler-jdt.version>
31-
<com.puppycrawl.tools.checkstyle.version>8.18</com.puppycrawl.tools.checkstyle.version>
31+
<com.puppycrawl.tools.checkstyle.version>8.29</com.puppycrawl.tools.checkstyle.version>
3232
<add.release.arguments />
3333
<forkCount>1</forkCount>
3434
<assertj.version>3.11.1</assertj.version>
@@ -278,7 +278,7 @@
278278
<plugin>
279279
<groupId>org.apache.maven.plugins</groupId>
280280
<artifactId>maven-checkstyle-plugin</artifactId>
281-
<version>3.0.0</version>
281+
<version>3.1.0</version>
282282
<configuration>
283283
<configLocation>build-config/checkstyle.xml</configLocation>
284284
<consoleOutput>true</consoleOutput>

processor/src/main/java/org/mapstruct/ap/internal/conversion/SimpleConversion.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ public List<HelperMethod> getRequiredHelperMethods(ConversionContext conversionC
4545
return Collections.emptyList();
4646
}
4747

48-
4948
/**
5049
* Returns the conversion string from source to target. The placeholder {@code <SOURCE>} can be used to represent a
5150
* reference to the source value.

processor/src/main/java/org/mapstruct/ap/internal/model/HelperMethod.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,6 @@ public boolean doTypeVarsMatch(Type parameter, Type returnType) {
177177
return true;
178178
}
179179

180-
181-
182180
/**
183181
* There's currently only one parameter foreseen instead of a list of parameter
184182
*

processor/src/main/java/org/mapstruct/ap/internal/model/LifecycleMethodResolver.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ public static List<LifecycleCallbackMethodReference> afterMappingMethods(Method
7373
existingVariableNames );
7474
}
7575

76-
7776
/**
7877
* @param method the method to obtain the beforeMapping methods for
7978
* @param selectionParameters method selectionParameters

processor/src/main/java/org/mapstruct/ap/internal/model/ObjectFactoryMethodResolver.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ public static MethodReference getFactoryMethod( Method method,
5050
return getFactoryMethod( method, method.getResultType(), selectionParameters, ctx );
5151
}
5252

53-
54-
5553
/**
5654
* returns a no arg factory method
5755
*

processor/src/main/java/org/mapstruct/ap/internal/model/common/TypeFactory.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ private Type getType(String canonicalName, boolean isLiteral) {
145145
return getType( typeElement, isLiteral );
146146
}
147147

148-
149148
/**
150149
* Determines if the type with the given full qualified name is part of the classpath
151150
*
@@ -597,7 +596,6 @@ else if ( typeMirror.getKind() == TypeKind.TYPEVAR ) {
597596
return typeMirror;
598597
}
599598

600-
601599
/**
602600
* Whether the given type is ready to be processed or not. It can be processed if it is not of kind
603601
* {@link TypeKind#ERROR} and all {@link AstModifyingAnnotationProcessor}s (if any) indicated that they've fully

processor/src/main/java/org/mapstruct/ap/internal/processor/AnnotationBasedComponentModelProcessor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ private AnnotatedConstructor buildAnnotatedConstructorForDecorator(Decorator dec
176176
);
177177
}
178178

179-
180179
/**
181180
* Removes duplicate constructor parameter annotations. If an annotation is already present on the constructor, it
182181
* does not have be defined on the constructor parameter, too. For example, for CDI, the javax.inject.Inject

processor/src/main/java/org/mapstruct/ap/spi/DefaultAccessorNamingStrategy.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ public boolean isGetterMethod(ExecutableElement method) {
8686
return isNonBooleanGetterName || ( isBooleanGetterName && returnTypeIsBoolean );
8787
}
8888

89-
9089
/**
9190
* Returns {@code true} when the {@link ExecutableElement} is a setter method. A setter starts with 'set'. The
9291
* remainder of the name is supposed to reflect the property name.

0 commit comments

Comments
 (0)