Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into pmd-7.0.0-rc4
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/quality-monitor.yml
#	doc/Continuous-Integration.md
  • Loading branch information
uhafner committed Mar 13, 2024
2 parents 8855d04 + b450b9b commit fcd2842
Show file tree
Hide file tree
Showing 5 changed files with 211 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/quality-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ jobs:
{
"id": "checkstyle",
"name": "CheckStyle",
"pattern": "**/target/checkstyle-result.xml"
"pattern": "**/target/**checkstyle-result.xml"
},
{
"id": "pmd",
"name": "PMD",
"pattern": "**/target/**/pmd.xml"
"pattern": "**/target/**pmd.xml"
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions doc/Continuous-Integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ definiert, d.h. eine Aktualisierung lässt sich im entsprechenden Abschnitt leic
über den [Dependabot](https://dependabot.com) Roboter von GitHub automatisch über einen Pull Request aktualisiert.
U.a. sind die folgenden Plugins vorkonfiguriert:
- maven-compiler-plugin: konfiguriert die Java Version auf Java 8 und legt alle Error Prone Regeln fest. Die Java
Version kann beliebig aktualisert werden.
Version kann beliebig aktualisiert werden.
- maven-javadoc-plugin: aktiviert die strikte Prüfung von JavaDoc Kommentaren
- maven-jar-plugin: legt einen Modulnamen fest, falls das Projekt in Java 9 oder höher verwendet wird. Außerdem wird
ein test-jar konfiguriert, sodass alle Tests (und abstrakte Testklassen) auch als Dependencies genutzt werden können.
- maven-pmd-plugin: prüft das Projekt mit PMD, die Regeln liegen in den Dateien [pmd-java-configuration.xml](../etc/pmd-java-configuration.xml), [pmd-tests-configuration.xml](../etc/pmd-tests-configuration.xml) und [pmd-javascript-configuration.xml](../etc/pmd-javascript-configuration.xml).
- maven-checkstyle-plugin: prüft das Projekt mit CheckStyle, die Regeln liegen in der Datei [checkstyle-configuration.xml](../etc/checkstyle-configuration.xml).
- maven-checkstyle-plugin: prüft das Projekt mit CheckStyle, die Regeln liegen in den Dateien [checkstyle-java-configuration.xml](../etc/checkstyle-java-configuration.xml) und [checkstyle-tests-configuration.xml](../etc/checkstyle-tests-configuration.xml).
- spotbugs-maven-plugin: prüft das Projekt mit SpotBugs, alle Regeln werden verwendet mit den Ausnahmen definiert in der Datei [spotbugs-exclusion-filter.xml](../etc/spotbugs-exclusion-filter.xml).
- org.revapi: prüft, ob die aktuelle Versionsnummer die [semantische Versionierung](https://semver.org) berücksichtigt (source and binary). D.h. es gilt:
1. Eine neue **Major** Version wurde definiert, wenn das API nicht mehr abwärtskompatibel ist.
Expand Down
File renamed without changes.
182 changes: 182 additions & 0 deletions etc/checkstyle-tests-configuration.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Checkstyle-Configuration: Ullrich Hafner
Description: Ullrich Hafner's Checkstyle Rules.
-->
<!-- ${project.groupId}:${project.artifactId}:${project.version} -->
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<property name="severity" value="warning"/>
<module name="RegexpMultiline">
<property name="format" value="\{\s*\R\s*\R"/>
<property name="message" value="No empty lines after opening curly braces allowed" />
</module>
<module name="RegexpMultiline">
<property name="format" value="\R\s*\R\s*\}"/>
<property name="message" value="No empty lines before closing curly braces allowed" />
</module>
<module name="TreeWalker">
<module name="SuppressWarningsHolder" />

<module name="NoWhitespaceBeforeCaseDefaultColon"/>
<module name="UnnecessarySemicolonAfterOuterTypeDeclaration"/>
<module name="UnnecessarySemicolonInTryWithResources"/>
<module name="UnnecessarySemicolonInEnumeration"/>
<module name="AvoidDoubleBraceInitialization"/>
<module name="NoEnumTrailingComma"/>
<module name="OneStatementPerLine"/>
<module name="OuterTypeFilename"/>
<module name="NestedForDepth">
<property name="max" value="2"/>
</module>
<module name="InnerTypeLast"/>

<module name="AnnotationUseStyle"/>
<module name="Indentation">
<property name="arrayInitIndent" value="8"/>
<property name="lineWrappingIndentation" value="8"/>
</module>
<module name="MissingDeprecated"/>
<module name="PackageAnnotation"/>
<module name="EqualsAvoidNull"/>
<module name="GenericWhitespace"/>
<module name="JavadocStyle">
<property name="severity" value="warning"/>
<property name="checkEmptyJavadoc" value="true"/>
</module>
<module name="JavadocType"/>
<module name="JavadocMethod"/>
<module name="JavadocParagraph"/>
<module name="JavadocVariable">
<property name="scope" value="protected"/>
<property name="tokens" value="VARIABLE_DEF"/>
</module>
<module name="MissingJavadocMethodCheck">
<property name="allowMissingPropertyJavadoc" value="true"/>
<property name="ignoreMethodNamesRegex" value="size|isEmpty|isNotEmpty"/>
</module>
<module name="MissingJavadocTypeCheck"/>
<module name="MissingJavadocPackageCheck"/>
<module name="JavadocMissingLeadingAsteriskCheck"/>
<module name="JavadocMissingWhitespaceAfterAsteriskCheck"/>
<module name="JavadocContentLocationCheck"/>
<module name="JavadocBlockTagLocation"/>
<module name="InvalidJavadocPosition"/>
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="LambdaParameterName"/>
<module name="TypeName"/>
<module name="ClassTypeParameterName"/>
<module name="MethodTypeParameterName"/>
<module name="AnonInnerLength">
<property name="max" value="10"/>
</module>
<module name="LambdaBodyLength">
<property name="max" value="10"/>
</module>
<module name="MethodLength"/>
<module name="ParameterNumber"/>
<module name="EmptyForIteratorPad"/>
<module name="EmptyLineSeparator">
<property name="allowMultipleEmptyLines" value="false"/>
<property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
<property name="allowNoEmptyLineBetweenFields" value="true"/>
</module>

<module name="NoWhitespaceAfter">
<property name="tokens" value="ARRAY_INIT,BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/>
</module>
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap"/>
<module name="TypecastParenPad">
<property name="tokens" value="RPAREN,TYPECAST"/>
</module>
<module name="WhitespaceAfter">
<property name="tokens" value="COMMA,SEMI"/>
</module>
<module name="WhitespaceAround">
<property name="tokens"
value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LCURLY,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND"/>
</module>
<module name="ParenPad"/>
<module name="MethodParamPad"/>
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<module name="AvoidNestedBlocks"/>
<module name="EmptyBlock">
<property name="option" value="text"/>
<property name="tokens" value="LITERAL_CATCH"/>
</module>
<module name="EmptyBlock">
<property name="tokens"
value="LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_IF,LITERAL_FOR,LITERAL_TRY,LITERAL_WHILE,STATIC_INIT"/>
</module>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="RightCurly">
<property name="option" value="alone"/>
</module>
<module name="CovariantEquals"/>
<module name="DefaultComesLast"/>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="FallThrough"/>
<module name="HiddenField">
<property name="ignoreConstructorParameter" value="true"/>
<property name="ignoreSetter" value="true"/>
<property name="ignoreAbstractMethods" value="true"/>
<property name="setterCanReturnItsClass" value="true"/>
</module>
<module name="IllegalThrows"/>
<module name="InnerAssignment"/>
<module name="ModifiedControlVariable"/>
<module name="MultipleVariableDeclarations"/>
<module name="NestedTryDepth"/>
<module name="NestedIfDepth">
<property name="max" value="2"/>
</module>
<module name="PackageDeclaration"/>
<module name="ParameterAssignment"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
<module name="SuperClone"/>
<module name="SuperFinalize"/>
<module name="InterfaceIsType"/>
<module name="MutableException"/>
<module name="ThrowsCount">
<property name="max" value="3"/>
</module>
<module name="VisibilityModifier"/>
<module name="BooleanExpressionComplexity"/>
<module name="ClassDataAbstractionCoupling">
<property name="max" value="10"/>
</module>
<module name="ClassFanOutComplexity">
<property name="max" value="25"/>
</module>
<module name="JavaNCSS"/>
<module name="ArrayTypeStyle"/>
<module name="UpperEll"/>
<module name="IllegalCatch"/>
<module name="IllegalImport">
<property name="illegalPkgs" value="net.jcip.annotations"/>
<property name="illegalClasses" value="edu.umd.cs.findbugs.annotations.Nullable, javax.annotation.Nullable, javax.annotation.CheckForNull, javax.annotation.Nonnull"/>
<property name="severity" value="error"/>
</module>
</module>
<module name="FileTabCharacter">
<property name="fileExtensions" value="jelly, java"/>
</module>
<module name="FileLength">
<property name="fileExtensions" value="jelly, java"/>
</module>
<module name="SuppressWarningsFilter" />
</module>
33 changes: 25 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<jacoco-maven-plugin.version>0.8.11</jacoco-maven-plugin.version>
<maven-pitest-plugin.version>1.15.8</maven-pitest-plugin.version>
<pitest-junit5-plugin.version>1.2.1</pitest-junit5-plugin.version>
<error-prone.version>2.25.0</error-prone.version>
<error-prone.version>2.26.1</error-prone.version>
<nullaway.version>0.10.24</nullaway.version>
<revapi-maven-plugin.version>0.15.0</revapi-maven-plugin.version>
<revapi-java.version>0.28.1</revapi-java.version>
Expand All @@ -110,9 +110,9 @@

<!-- OpenRewrite versions -->
<rewrite-maven-plugin.version>5.24.0</rewrite-maven-plugin.version>
<rewrite-testing-frameworks.version>2.4.1</rewrite-testing-frameworks.version>
<rewrite-testing-frameworks.version>2.5.0</rewrite-testing-frameworks.version>
<rewrite-static-analysis.version>1.3.1</rewrite-static-analysis.version>
<rewrite-migrate-java.version>2.9.1</rewrite-migrate-java.version>
<rewrite-migrate-java.version>2.10.0</rewrite-migrate-java.version>
<rewrite-recommendations.version>1.2.3</rewrite-recommendations.version>

<!-- Maven Surefire ArgLine -->
Expand Down Expand Up @@ -622,10 +622,8 @@
<version>${maven-checkstyle-plugin.version}</version>
<configuration>
<linkXRef>false</linkXRef>
<excludes>**/*Assert*.java,**/*_jmh*,**/module-info.java</excludes>
<failOnViolation>false</failOnViolation>
<configLocation>etc/checkstyle-configuration.xml</configLocation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<excludeGeneratedSources>true</excludeGeneratedSources>
<failsOnError>false</failsOnError>
</configuration>
<dependencies>
<dependency>
Expand All @@ -636,11 +634,30 @@
</dependencies>
<executions>
<execution>
<id>run-checkstyle</id>
<id>run-checkstyle-java</id>
<goals>
<goal>checkstyle</goal>
</goals>
<phase>verify</phase>
<configuration>
<excludes>**/module-info.java</excludes>
<includeTestSourceDirectory>false</includeTestSourceDirectory>
<configLocation>etc/checkstyle-java-configuration.xml</configLocation>
<outputFile>${project.build.directory}/checkstyle-java/checkstyle-result.xml</outputFile>
</configuration>
</execution>
<execution>
<id>run-checkstyle-tests</id>
<goals>
<goal>checkstyle</goal>
</goals>
<phase>verify</phase>
<configuration>
<excludes>**/*Assert*.java,**/*_jmh*,**/module-info.java</excludes>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<configLocation>etc/checkstyle-tests-configuration.xml</configLocation>
<outputFile>${project.build.directory}/checkstyle-tests/checkstyle-result.xml</outputFile>
</configuration>
</execution>
</executions>
</plugin>
Expand Down

0 comments on commit fcd2842

Please sign in to comment.