Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[MCHECKSTYLE-351] Plugin execution fails on error when using google_checks

Open
#264 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
build-system

Research direction

Reproduce the issue with Maven Checkstyle Plugin 3.0.0 and Checkstyle 6.18 using the shown configuration, first with the default rules and then with google_checks.xml. Compare the build result with checkstyle-report.xml; done means violations using google_checks.xml cause the plugin execution to fail as expected.

Written by the indexing model from the issue text.

Description

bug priority:major

Martin Schneider opened MCHECKSTYLE-351 and commented

 
I'm using the version 3.0.0 with Checkstyle 6.18.

This is my initial configuration:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-checkstyle-plugin</artifactId>
  <version>${maven.checkstyle.plugin.version}</version>
  <configuration>
    <failsOnError>true</failsOnError>
    <failOnViolation>true</failOnViolation>
  </configuration>
</plugin>

Running mvn checkstyle:checkstyle will fail the build since there are checkstyle errors. This is expected. 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check (default-cli) on project demo: Failed during checkstyle execution: There are 311 errors reported by Checkstyle 6.18 with sun_checks.xml ruleset. -> [Help 1]

However, when I use google_checks.xml the build succeeds without any error (checkstyle-report.xml still shows the issues).

 

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-checkstyle-plugin</artifactId>
  <version>${maven.checkstyle.plugin.version}</version>
  <configuration>
    <configLocation>google_checks.xml</configLocation>
    <failsOnError>true</failsOnError>
    <failOnViolation>true</failOnViolation>
  </configuration>
</plugin>

 

My expectation would be that the build fails when I use the google_checks.xml configuration.

https://stackoverflow.com/questions/50040980/checkstyle-maven-plugin-doesnt-fail-on-error-when-using-google-checks


No further details from MCHECKSTYLE-351

Dominant language
Java
Stars
97
Forks
68
Avg merge
2d 14h
Merged PRs (30d)
8

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/maven-checkstyle-plugin

All issues in apache/maven-checkstyle-plugin

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.