Skip to content

Add PMD to Ensure Code Quality and Best Practices#45595

Closed
Pankraz76 wants to merge 2 commits into
quarkusio:mainfrom
Pankraz76:introduce-pmd
Closed

Add PMD to Ensure Code Quality and Best Practices#45595
Pankraz76 wants to merge 2 commits into
quarkusio:mainfrom
Pankraz76:introduce-pmd

Conversation

@Pankraz76

Copy link
Copy Markdown

This PR integrates the Maven PMD Plugin to enforce code quality standards and best practices. Key updates include:

  • Added PMD plugin to pom.xml with caching and exclusions.
  • Created .pmd/exclude.properties for managing ignored violations.
  • Updated .gitignore to exclude .pmd/.cache.

Common rules like TooManyStaticImports are acceptable to remain, but other exclusions should be reconsidered and removed step by step.

Comment thread pom.xml Outdated
@Pankraz76

Copy link
Copy Markdown
Author

is this any good ?

@Pankraz76
Pankraz76 marked this pull request as ready for review January 14, 2025 22:30
@geoand

geoand commented Jan 16, 2025

Copy link
Copy Markdown
Contributor

As mentioned in the discussion in #45417, we are not going to add this tool the repo

@geoand geoand closed this Jan 16, 2025
@quarkus-bot quarkus-bot Bot added the triage/invalid This doesn't seem right label Jan 16, 2025
Comment thread pom.xml
<excludeFromFailureFile>${project.basedir}/.pmd/exclude.properties</excludeFromFailureFile>
<printFailingErrors>true</printFailingErrors>
</configuration>
<executions>

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rule set here is missing. This is just subset of whats really going on.

io.quarkus.logging.Log=UnnecessaryFullyQualifiedName
io.quarkus.runtime.BlockingOperationControl=UnnecessaryFullyQualifiedName
io.quarkus.runtime.LaunchMode=UnnecessaryFullyQualifiedName
io.quarkus.runtime.configuration.NameIterator=EmptyControlStatement

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if maven has 500, might be here 2k due to the huge code base.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core triage/invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants