Skip to content

[java,apex] Remove deprecated and unused rules#2022

Merged
adangel merged 16 commits into
pmd:pmd/7.0.xfrom
oowekyala:remove-unused-rules
Feb 18, 2020
Merged

[java,apex] Remove deprecated and unused rules#2022
adangel merged 16 commits into
pmd:pmd/7.0.xfrom
oowekyala:remove-unused-rules

Conversation

@oowekyala

@oowekyala oowekyala commented Sep 18, 2019

Copy link
Copy Markdown
Member

This PR

This is just legacy code that makes it harder to do progress on other parts of 7.0.x (eg some of them use the old property constructors).

@oowekyala oowekyala added this to the 7.0.0 milestone Sep 18, 2019
@jsotuyod jsotuyod added the is:WIP For PRs that are not fully ready, or issues that are actively being tackled label Sep 19, 2019
@adangel adangel changed the title [java,apex] Remove unused rules [java,apex] Remove deprecated and unused rules Sep 20, 2019
@oowekyala

oowekyala commented Sep 20, 2019

Copy link
Copy Markdown
Member Author

@jsotuyod The build is failing because the old deprecated rulesets (eg codesize.xml) reference inexistent rules now. Can I remove them in this PR too? I don't see the point of fixing the files only to remove them later on. Let's do that later

* AbstractNaming
* AvoidFinalLocalVariable
* AvoidPrefixingMethodParameters
* ForLoopsMustUseBraces
* IfElseStmtsMustUseBraces
* IfStmtsMustUseBraces
* MIsLeadingVariableName
* SuspiciousConstantFieldName
* WhileLoopsMustUseBraces
* UnsynchronizedStaticDateFormatter
@adangel

adangel commented Sep 24, 2019

Copy link
Copy Markdown
Member

At some point before releasing pmd 7, we need to delete the pmd 5 rulesets, which are all deprecated.
We might deprecate more rules until we release pmd 7 (like UseObjectForClearerApi, SimplifyStartsWith - see https://github.com/pmd/pmd/wiki/PMD-7.0.0). Not sure however, whether we would directly remove these rules with pmd 7 - but I think, that's ok, because it's a major version change.
For removing the old rulesets, we need to consider the other languages as well (not only apex and java).

@adangel

adangel commented Sep 24, 2019

Copy link
Copy Markdown
Member

Oh, and before actually deleting these "unlinked/unused" rules, we should collect them, if they sound useful, to have suggestions for new rules (see also https://github.com/pmd/pmd/wiki/Project-Ideas-%5BMature%5D#new-rules) - even if we don't implement them now.

@oowekyala

Copy link
Copy Markdown
Member Author

@adangel I think it's ok to remove rules that were not necessarily deprecated for 7.0.x. I think though, that it would be nice for rules that are not found to cause a warning instead of a ruleset parsing error. At the very least, we should collect all failures and present them all to the user instead of one by one. This will make version transitions smoother for the user

@oowekyala oowekyala removed the is:WIP For PRs that are not fully ready, or issues that are actively being tackled label Dec 26, 2019
@ghost

ghost commented Dec 26, 2019

Copy link
Copy Markdown
1 Message
📖 No java rules are changed!

Generated by 🚫 Danger

@adangel adangel self-assigned this Feb 17, 2020
@adangel adangel merged commit fcd446f into pmd:pmd/7.0.x Feb 18, 2020
@oowekyala oowekyala deleted the remove-unused-rules branch February 19, 2020 13:46
@adangel adangel mentioned this pull request May 23, 2020
6 tasks
oowekyala added a commit that referenced this pull request Dec 10, 2020
…omparsons, PositionLiteralsFirstInComparisons

Refs #2493, #2701, #2022
@adangel adangel added the is:feature-removal Remove an unneeded unused feature label Jan 12, 2023
@adangel adangel mentioned this pull request Jan 23, 2023
55 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

is:feature-removal Remove an unneeded unused feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants