Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try Checkstyle backport JRE8 10.x #143

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ under the License.
<javaVersion>8</javaVersion>
<mavenVersion>3.6.3</mavenVersion>
<resolverVersion>1.4.1</resolverVersion>
<checkstyleVersion>9.3</checkstyleVersion>
<checkstyleVersion>10.17.0</checkstyleVersion>
<slf4jVersion>1.7.36</slf4jVersion>
<doxiaVersion>1.11.1</doxiaVersion>
<doxiaSitetoolsVersion>1.11.1</doxiaSitetoolsVersion>
Expand Down Expand Up @@ -197,7 +197,7 @@ under the License.
<!-- checkstyle -->
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<artifactId>checkstyle-backport-jre8</artifactId>
<version>${checkstyleVersion}</version>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/it/MCHECKSTYLE-338/empty-logging-check/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<artifactId>checkstyle-backport-jre8</artifactId>
<version>@checkstyleVersion@</version>
</dependency>
</dependencies>
Expand Down
18 changes: 8 additions & 10 deletions src/it/MCHECKSTYLE-357-with-header-override/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
<property name="charset" value="UTF-8" />
<property name="severity" value="error" />

<!-- Sizes -->
<module name="LineLength">
<property name="max" value="120" />
</module>

<module name="TreeWalker">
<property name="tabWidth" value="3" />

Expand All @@ -55,9 +60,7 @@

<!-- Annotations -->
<module name="AnnotationUseStyle" />
<module name="MissingDeprecated">
<property name="skipNoJavadoc" value="true" />
</module>
<module name="MissingDeprecated" />
<module name="MissingOverride" />
<module name="PackageAnnotation" />

Expand Down Expand Up @@ -133,11 +136,6 @@

<!-- Naming -->
<module name="ConstantName" />

<!-- Sizes -->
<module name="LineLength">
<property name="max" value="120" />
</module>
</module>

<module name="RegexpSingleline">
Expand Down Expand Up @@ -169,8 +167,8 @@
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.15</version>
<artifactId>checkstyle-backport-jre8</artifactId>
<version>@checkstyleVersion@</version>
</dependency>
</dependencies>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,10 @@ protected AuditListener getListener() throws MavenReportException {
listener = new DefaultLogger(out, OutputStreamOptions.CLOSE);
} else if ("sarif".equals(outputFileFormat)) {
try {
listener = new SarifLogger(out, OutputStreamOptions.CLOSE);
listener = new SarifLogger(
out,
com.puppycrawl.tools.checkstyle.AbstractAutomaticBean.OutputStreamOptions.valueOf(
OutputStreamOptions.CLOSE.name()));
} catch (IOException e) {
throw new MavenReportException("Failed to create SarifLogger", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,10 @@ private AuditListener getListener() throws MojoFailureException, MojoExecutionEx
OutputStream xmlOut = getOutputStream(outputXmlFile);
CompositeAuditListener compoundListener = new CompositeAuditListener();
compoundListener.addListener(new XMLLogger(xmlOut, OutputStreamOptions.CLOSE));
compoundListener.addListener(new SarifLogger(out, OutputStreamOptions.CLOSE));
compoundListener.addListener(new SarifLogger(
out,
com.puppycrawl.tools.checkstyle.AbstractAutomaticBean.OutputStreamOptions.valueOf(
OutputStreamOptions.CLOSE.name())));
listener = compoundListener;
} catch (IOException e) {
throw new MojoExecutionException("Unable to create temporary file", e);
Expand Down
2 changes: 1 addition & 1 deletion src/site/apt/examples/inline-checker-config.apt.vm
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Using a different header
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.15</version>
<version>${checkstyleVersion}</version>
</dependency>
</dependencies>
</plugin>
Expand Down
2 changes: 1 addition & 1 deletion src/site/apt/examples/upgrading-checkstyle.apt.vm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
Upgrading Checkstyle at Runtime

Maven Checkstyle plugin comes with a default Checkstyle version: for <<<maven-checkstyle-plugin ${project.version}>>>,
Checkstyle ${checkstyleVersion} is used by default.
Checkstyle ${checkstyleVersion} is used by default.

Given Checkstyle generally keeps good compatibility between versions, you can override the version used at runtime to
benefit from {{{https://checkstyle.org/releasenotes.html}Checkstyle latest bugfixes}}:
Expand Down
Loading