mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#2016 Update Checkstyle to 8.29
Adapt checkstyle configuration with new changes: * Move cacheFile to Checker module * Move LineLength to Checker module * Use SuppressWithPlainTextCommentFilter
This commit is contained in:
parent
58da2d293f
commit
95ceba1a1e
1
.gitignore
vendored
1
.gitignore
vendored
@ -23,3 +23,4 @@ test-output
|
||||
|
||||
# Misc.
|
||||
.DS_Store
|
||||
checkstyle.cache
|
||||
|
@ -15,6 +15,8 @@
|
||||
<property name="basedir" value="${basedir}"/>
|
||||
-->
|
||||
|
||||
<property name="cacheFile" value="${checkstyle.cache.file}"/>
|
||||
|
||||
<!-- Checks that each Java package has a Javadoc file used for commenting. -->
|
||||
<!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
|
||||
<!--
|
||||
@ -29,6 +31,13 @@
|
||||
|
||||
<module name="FileLength"/>
|
||||
|
||||
<module name="LineLength">
|
||||
<property name="max" value="150"/>
|
||||
<property name="fileExtensions" value="java" />
|
||||
</module>
|
||||
|
||||
<module name="SuppressWithPlainTextCommentFilter"/>
|
||||
|
||||
<!-- Following interprets the header file as regular expressions. -->
|
||||
<!-- <module name="RegexpHeader"/> -->
|
||||
|
||||
@ -60,8 +69,6 @@
|
||||
|
||||
<module name="TreeWalker">
|
||||
|
||||
<property name="cacheFile" value="${checkstyle.cache.file}"/>
|
||||
|
||||
<module name="SuppressWarningsHolder"/>
|
||||
|
||||
<!-- Checks for Javadoc comments. -->
|
||||
@ -115,9 +122,6 @@
|
||||
|
||||
<!-- Checks for Size Violations. -->
|
||||
<!-- See http://checkstyle.sf.net/config_sizes.html -->
|
||||
<module name="LineLength">
|
||||
<property name="max" value="120"/>
|
||||
</module>
|
||||
<module name="MethodLength"/>
|
||||
<module name="ParameterNumber">
|
||||
<property name="max" value="10"/>
|
||||
|
@ -28,7 +28,7 @@
|
||||
<org.apache.maven.plugins.javadoc.version>3.1.0</org.apache.maven.plugins.javadoc.version>
|
||||
<org.springframework.version>4.0.3.RELEASE</org.springframework.version>
|
||||
<org.eclipse.tycho.compiler-jdt.version>0.26.0</org.eclipse.tycho.compiler-jdt.version>
|
||||
<com.puppycrawl.tools.checkstyle.version>8.18</com.puppycrawl.tools.checkstyle.version>
|
||||
<com.puppycrawl.tools.checkstyle.version>8.29</com.puppycrawl.tools.checkstyle.version>
|
||||
<add.release.arguments />
|
||||
<forkCount>1</forkCount>
|
||||
<assertj.version>3.11.1</assertj.version>
|
||||
@ -278,7 +278,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<configLocation>build-config/checkstyle.xml</configLocation>
|
||||
<consoleOutput>true</consoleOutput>
|
||||
|
@ -45,7 +45,6 @@ public abstract class SimpleConversion implements ConversionProvider {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the conversion string from source to target. The placeholder {@code <SOURCE>} can be used to represent a
|
||||
* reference to the source value.
|
||||
|
@ -177,8 +177,6 @@ public abstract class HelperMethod implements Method {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* There's currently only one parameter foreseen instead of a list of parameter
|
||||
*
|
||||
|
@ -73,7 +73,6 @@ public final class LifecycleMethodResolver {
|
||||
existingVariableNames );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param method the method to obtain the beforeMapping methods for
|
||||
* @param selectionParameters method selectionParameters
|
||||
|
@ -50,8 +50,6 @@ public class ObjectFactoryMethodResolver {
|
||||
return getFactoryMethod( method, method.getResultType(), selectionParameters, ctx );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* returns a no arg factory method
|
||||
*
|
||||
|
@ -145,7 +145,6 @@ public class TypeFactory {
|
||||
return getType( typeElement, isLiteral );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determines if the type with the given full qualified name is part of the classpath
|
||||
*
|
||||
@ -597,7 +596,6 @@ public class TypeFactory {
|
||||
return typeMirror;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Whether the given type is ready to be processed or not. It can be processed if it is not of kind
|
||||
* {@link TypeKind#ERROR} and all {@link AstModifyingAnnotationProcessor}s (if any) indicated that they've fully
|
||||
|
@ -176,7 +176,6 @@ public abstract class AnnotationBasedComponentModelProcessor implements ModelEle
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Removes duplicate constructor parameter annotations. If an annotation is already present on the constructor, it
|
||||
* does not have be defined on the constructor parameter, too. For example, for CDI, the javax.inject.Inject
|
||||
|
@ -86,7 +86,6 @@ public class DefaultAccessorNamingStrategy implements AccessorNamingStrategy {
|
||||
return isNonBooleanGetterName || ( isBooleanGetterName && returnTypeIsBoolean );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns {@code true} when the {@link ExecutableElement} is a setter method. A setter starts with 'set'. The
|
||||
* remainder of the name is supposed to reflect the property name.
|
||||
|
@ -8,7 +8,6 @@ package org.mapstruct.ap.test.accessibility.referenced.a;
|
||||
import org.mapstruct.ap.test.accessibility.referenced.ReferencedSource;
|
||||
import org.mapstruct.ap.test.accessibility.referenced.ReferencedTarget;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
|
@ -29,7 +29,6 @@ public class PetMapper {
|
||||
.put( 3L, "cat" )
|
||||
.put( 4L, "dog" ).build();
|
||||
|
||||
|
||||
/**
|
||||
* method to be used when using an adder
|
||||
*
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.bugs._375;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.bugs._513;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.bugs._513;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.bugs._513;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
|
@ -198,8 +198,6 @@ public class Issue913GetterMapperForCollectionsTest {
|
||||
assertThat( domain2.getLongs() ).isEmpty();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* These assert check if non-null and default mapping is working as expected.
|
||||
*
|
||||
|
@ -31,7 +31,6 @@ public class PetMapper {
|
||||
.put( 3L, "cat" )
|
||||
.put( 4L, "dog" ).build();
|
||||
|
||||
|
||||
/**
|
||||
* method to be used when using an adder
|
||||
*
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.collection.adder.source;
|
||||
|
||||
|
||||
/**
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
|
@ -7,7 +7,6 @@ package org.mapstruct.ap.test.conversion.java8time.localdatetoxmlgregoriancalend
|
||||
|
||||
import javax.xml.datatype.XMLGregorianCalendar;
|
||||
|
||||
|
||||
/**
|
||||
* @author Andreas Gudian
|
||||
*/
|
||||
|
@ -7,7 +7,6 @@ package org.mapstruct.ap.test.erroneous.ambiguousannotatedfactorymethod;
|
||||
|
||||
import org.mapstruct.ObjectFactory;
|
||||
|
||||
|
||||
/**
|
||||
* @author Remo Meier
|
||||
*/
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.erroneous.ambiguousannotatedfactorymethod;
|
||||
|
||||
|
||||
/**
|
||||
* @author Remo Meier
|
||||
*/
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.erroneous.ambiguousannotatedfactorymethod;
|
||||
|
||||
|
||||
/**
|
||||
* @author Remo Meier
|
||||
*/
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.erroneous.ambiguousannotatedfactorymethod;
|
||||
|
||||
|
||||
/**
|
||||
* @author Remo Meier
|
||||
*/
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.erroneous.ambiguousfactorymethod;
|
||||
|
||||
|
||||
/**
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.erroneous.ambiguousfactorymethod;
|
||||
|
||||
|
||||
/**
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.erroneous.ambiguousfactorymethod;
|
||||
|
||||
|
||||
/**
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
|
@ -7,7 +7,6 @@ package org.mapstruct.ap.test.erroneous.ambiguousfactorymethod.a;
|
||||
|
||||
import org.mapstruct.ap.test.erroneous.ambiguousfactorymethod.Bar;
|
||||
|
||||
|
||||
/**
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.generics;
|
||||
|
||||
|
||||
/**
|
||||
* @author Andreas Gudian
|
||||
*/
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.generics;
|
||||
|
||||
|
||||
/**
|
||||
* @author Andreas Gudian
|
||||
*
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.nestedsourceproperties._target;
|
||||
|
||||
|
||||
/**
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.nestedsourceproperties._target;
|
||||
|
||||
|
||||
/**
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
|
@ -7,7 +7,6 @@ package org.mapstruct.ap.test.nestedsourceproperties.source;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.nullcheck;
|
||||
|
||||
|
||||
/**
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.references;
|
||||
|
||||
|
||||
/**
|
||||
* @author Andreas Gudian
|
||||
*
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.selection.primitives;
|
||||
|
||||
|
||||
/**
|
||||
* @author Sjaak Derksen
|
||||
*
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.source.constants;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.source.constants;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.source.constants;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.template;
|
||||
|
||||
|
||||
/**
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.template;
|
||||
|
||||
|
||||
/**
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
|
@ -57,7 +57,6 @@ public class GeneratedSource implements TestRule {
|
||||
GeneratedSource.compilingStatement.remove();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds more mappers that need to be compared.
|
||||
*
|
||||
|
@ -7,6 +7,8 @@
|
||||
<!-- Based on sun_checks.xml from the CheckStyle distribution -->
|
||||
|
||||
<module name="Checker">
|
||||
|
||||
<property name="cacheFile" value="${checkstyle.cache.file}"/>
|
||||
<!--
|
||||
If you set the basedir property below, then all reported file
|
||||
names will be relative to the specified directory. See
|
||||
@ -56,8 +58,6 @@
|
||||
|
||||
<module name="TreeWalker">
|
||||
|
||||
<property name="cacheFile" value="${checkstyle.cache.file}"/>
|
||||
|
||||
<!-- Checks for Naming Conventions. -->
|
||||
<!-- See http://checkstyle.sf.net/config_naming.html -->
|
||||
<!-- <module name="ConstantName"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user