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

Enhance PMD rules #2753

Merged
merged 10 commits into from
Dec 4, 2023
Merged

Enhance PMD rules #2753

merged 10 commits into from
Dec 4, 2023

Conversation

idelpivnitskiy
Copy link
Member

Motivation:

Currently, pmd/basic.xml defines explicit set of rules to validate. With this
strategy we miss all new rules that PMD adds overtime.

Modifications:

  • Rework pmd/basic.xml to include all rules by default but exclude those
    that are not providing much value;
  • Correct our codebase to satisfy all newly activated rules;

Result:

More coverage during automated code validation that will reduce nit-picking
comments during PR reviews.

@idelpivnitskiy idelpivnitskiy self-assigned this Nov 13, 2023
Copy link
Contributor

@bryce-anderson bryce-anderson left a comment

Choose a reason for hiding this comment

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

Seems good to me but you should get a second opinion on the rules you've selected.

@daschl
Copy link
Contributor

daschl commented Nov 21, 2023

Other than the comments, looks good to me. Admittedly I did not read every exclude rule in detail, but I think if we want to enable more we should do in follow-up PRs since this one is quite big already and naturally touches a lot of files.

@idelpivnitskiy
Copy link
Member Author

if we want to enable more we should do in follow-up PRs since this one is quite big already and naturally touches a lot of files

Those that are left excluded were quite noisy and didn't provide much value. I'm happy to exclude more rules and revert changes if anything looks unreasonable.

@idelpivnitskiy idelpivnitskiy merged commit b8149d3 into apple:main Dec 4, 2023
15 checks passed
@idelpivnitskiy idelpivnitskiy deleted the pmd-rules branch December 4, 2023 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants