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

Impractical to fail build on violation #5034

Closed
delanym opened this issue May 23, 2024 · 1 comment
Closed

Impractical to fail build on violation #5034

delanym opened this issue May 23, 2024 · 1 comment
Labels
a:bug PMD crashes or fails to analyse a file.

Comments

@delanym
Copy link

delanym commented May 23, 2024

Let me start with what I'm trying to achieve. I have a multi-module build and I want it to fail on a violation, quickly.
I'm not interesting in producing a report.
The build may include anything from a single module to all modules. In each case, I don't want PMD to try parse the entire code base if I only asked Maven to build a single module.

I notice that if I use the "aggregate-pmd-check" goal, I get log lines like
[WARNING] org.apache.maven.plugins.pmd.AggregatorPmdReport - Unable to locate Source XRef to link to - DISABLED

Why is AggregatorPmdReport being invoked? Sounds like a legacy issue.

I also notice that unlike most Maven plugins, the pmd-maven-plugin goal is always forking, indicated by chevrons in the output <<< pmd:3.22.0:check

With a single custom XPath rule, the time to complete a build becomes impractical.
I was hoping to add pmd to my list of static analysis checkers/formatters like checkstyle, impsort, sortpom, errorprone, modernizer etc which are all able to parse source code and do various checks without becoming a burden.
With the current state of the pmd-maven-plugin (v3.22.0) that does not look likely.

@delanym delanym added the a:bug PMD crashes or fails to analyse a file. label May 23, 2024
@jsotuyod
Copy link
Member

This repository is about PMD itself. Maven PMD Plugin lives at apache.org -> https://issues.apache.org/jira/projects/MPMD/summary

@jsotuyod jsotuyod closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug PMD crashes or fails to analyse a file.
Projects
None yet
Development

No branches or pull requests

2 participants