Skip to content

Add PMD to Ensure Code Quality and Best Practices #45595

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

Closed
wants to merge 2 commits into from

Conversation

Pankraz76
Copy link

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.

@Pankraz76
Copy link
Author

is this any good ?

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

geoand commented Jan 16, 2025

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
<excludeFromFailureFile>${project.basedir}/.pmd/exclude.properties</excludeFromFailureFile>
<printFailingErrors>true</printFailingErrors>
</configuration>
<executions>
Copy link
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
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
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