efegokdemir opened a new pull request, #709:
URL: https://github.com/apache/maven-checkstyle-plugin/pull/709

   ## Summary
   
   Fixes #656.
   
   `failsOnError` violations are build failures, not plugin execution errors. 
The previous executor exception prevented the `checkstyle:checkstyle` report 
from rendering when the parameter was enabled.
   
   ## Changes
   
   - Record the `failsOnError` message in `CheckstyleResults` instead of 
throwing from `DefaultCheckstyleExecutor`.
   - Convert that recorded message to `MojoFailureException` in the `check` 
goal.
   - Re-enable the report regression test and assert that the site report is 
generated with `failsOnError` enabled.
   - Update the check-goal test to distinguish a build failure from a plugin 
execution error.
   
   ## Testing
   
   - `JAVA_HOME=/opt/homebrew/opt/openjdk@21 mvn 
-Dtest=CheckstyleReportTest,CheckstyleViolationCheckMojoTest test` — PASS (16 
tests)
   - `JAVA_HOME=/opt/homebrew/opt/openjdk@21 mvn verify` — PASS (26 tests)
   - `JAVA_HOME=/opt/homebrew/opt/openjdk@21 mvn -Prun-its verify` — PASS (49 
integration tests)
   - `git diff --check` — PASS
   
   ## Notes
   
   The implementation was checked against the previously closed PR #695, but no 
open pull request overlaps this change. The approach keeps report generation 
independent from the check goal's failure semantics.
   
   AI assistance was used during implementation. The changes and validation 
were reviewed by the submitting contributor.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to