-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add PMD to core #45417
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
Add PMD to core #45417
Conversation
Thanks for your pull request! Your pull request does not follow our editorial rules. Could you have a look?
This message is automatically generated by a bot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are not changes we want
|
PMD 7.7.0 has found 18 violations |
What specifically don't you like about it? Is it too much, or is there something else going on? I applied the Boy Scout principle, cleaning up code wherever I found issues. Do you guys care about best practices? If so, PMD is a great tool to help enforce them and prevent bugs or violations from the start, rather than letting technical debt accumulate. Let me know what I can do to make this acceptable for you. And please don't shoot the messenger! |
We tend to avoid static code analysis in Quarkus. Most of them are made for application developers, and it can be hard to tune them for frameworks with slightly more complex and low-level code. If I look at the list of violations, none is critical. The necessary usage of the Same thing about parenthesis - in general, there are ways to improve the understandability of complex expressions. So, basically, we would have only one violation in the list: the extra semi-colon (which I believe is a typo). Quarkus codebase is quite large and somewhat complex. People writing and maintaining the code are not necessarily the same (and even where it is, you are always happy to find some explanations from pour previous-self). Thus, we keep "extra hints" in the code to improve understandability. It's often not an oversight, but a deliberate decision. |
+1 and just to make it clear - tools that actually can be tuned and run well on Quarkus projects we definitely do try and utilize. i.e. we have the importsort, code formatting and a few more. If anyone interested in opening PR's on adding things please put in description what is being suggested, what the tool is doing and how its going to help improve Quarkus - and no, "have less warnings when running this tool" is NOT a valid reason. It should be because it solves and actual problem that helps us and/or users in way that is not super costly (i.e. getting to deal with lots of meaningless false positives over things that are trivially fixed otherwise). |
how should they work together if not with norma and conventions ? I think its called best practices for a reason. Having unused obsolete stuff is never a benefit. Not in application server or whatever you want to call it. |
Its just bad code not begin fixed and not being reviews properly. Humans can never be as exact as PMD. |
No description provided.