PMD Tool Fails Locally but CI Doesn't Detect It #18479
Summary
Running PMD locally fails, but the CI pipeline doesn't catch this failure. The issue appears after splitting tools in the CI setup.
Details
After splitting the tools in our CI configuration, we've encountered two issues that question the overall CI setup.
Related Links
Expected Behavior
- PMD should run successfully both locally and in CI
- CI should fail when PMD encounters issues
- Local and CI behavior should be consistent
Current Behavior
- PMD fails when running locally
- CI pipeline continues without detecting the PMD failure
- Inconsistent behavior between local and CI environments
Impact
- Developers may miss critical code quality issues
- Inconsistent feedback between local development and CI
- Potential quality issues may reach production
Notes
Need to investigate why CI isn't catching the PMD failures that occur locally. This suggests a configuration discrepancy between local and CI environments.
[INFO]
[INFO] --- pmd:3.28.0:check (default-cli) @ checkstyle ---
[WARNING] PMD Failure: com.puppycrawl.tools.checkstyle.AbstractAutomaticBean:243 Rule:ExceptionAsFlowControl Priority:3 Exception thrown at line 237 is caught in this block..
[WARNING] PMD Failure: com.puppycrawl.tools.checkstyle.DetailNodeTreeStringPrinter:80 Rule:UnusedPrivateMethod Priority:3 Avoid unused private methods such as 'parseJavadocAsDetailNode(String)'..
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:17 min
[INFO] Finished at: 2025-12-31T11:27:50Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.28.0:check (default-cli) on project checkstyle: PMD 7.20.0 has found 2 violations. For more details see: /home/circleci/project/target/pmd.xml -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.28.0:check (default-cli) on project checkstyle: PMD 7.20.0 has found 2 violations. For more details see: /home/circleci/project/target/pmd.xml
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
at org.apache.maven.lifecycle.inte
PMD Tool Fails Locally but CI Doesn't Detect It #18479
Summary
Running PMD locally fails, but the CI pipeline doesn't catch this failure. The issue appears after splitting tools in the CI setup.
Details
After splitting the tools in our CI configuration, we've encountered two issues that question the overall CI setup.
Related Links
spotbugsandpmdconfig withrewrite#18454 #18479 #18440Expected Behavior
Current Behavior
Impact
Notes
Need to investigate why CI isn't catching the PMD failures that occur locally. This suggests a configuration discrepancy between local and CI environments.