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

Ability to select PMD version #63

Open
sebastianhaberey opened this issue Oct 12, 2018 · 7 comments
Open

Ability to select PMD version #63

sebastianhaberey opened this issue Oct 12, 2018 · 7 comments

Comments

@sebastianhaberey
Copy link

sebastianhaberey commented Oct 12, 2018

Hi! First off, thank you for PMD-IntelliJ, we are using it in production here and it works fine! If I had one wish, it would be to be able to choose the PMD version that PMD-Intellij uses for checking, like the CheckStyle-IDEA plugin does:

checkstyle-intellij

The problem is that we like to keep our plugins up-to-date and when a new PMD-IntelliJ-Version comes out, everybody clicks "Update". But then, newly introduced PMD warnings pop up and we have a "no-warnings" check-in policy.

So now, someone has to review the newly introduced PMD rules and configure them according to team preferences. Also, the maven PMD configuration needs to be updated so the warnings on the build server match the warnings in IntelliJ. Sure, we're going to do this eventually, but we'd like to be able to do this as a planned item and not in the middle of a sprint.

There's an option in IntelliJ to configure the required plugin version for a project, but it doesn't seem to work as expected. I filed an issue for that, but I don't think it has top priority.

tl;dr updating PMD-IntelliJ often leads to new PMD warnings, creating unplanned work, user-stipulated PMD version would help

@rbieniek
Copy link

Another point here supporting the request is that the currently used PMD version is not handling recently introduced rules which came along with a newer version of PMD, for example 'AvoidMessageDigestField'

@triestelaporte
Copy link

I'd settle for a plugin that used PMD 6.22+ 😁 But specifying version would be nice.

@amitdev
Copy link
Owner

amitdev commented Jul 19, 2020

Updated to 6.25. Adding support to choose PMD version is tricky and I don't have time to look at it now. Happy to accept PRs though :)

@jborgers
Copy link
Collaborator

you can always download the desired release from GitHub and install the plugin in IntelliJ from file. Would that help?

@sebastianhaberey
Copy link
Author

Wow this is ancient 😄 IIRC that doesn't help since IntelliJ would still offer to update the manually installed plugin every time a new PMD version comes out.

@jborgers
Copy link
Collaborator

So actually, you want to be able to define the set of pmd standard rules (and custom rules) for a project, separately from the version of PMD, the version of the PMD-Plugin and the version of IntelliJ, right?
Then any upgrade will not raise new PMD violations in the project.

Except when rules have corrections (false positives, missed cases), I think those changes provided by the rule definitions should be applied. So in that case the violation results can differ and raise new issues.

You still may want to know new violations and want to fix them, only when it suits you, separately from the upgrade. So a notification that you use an outdated version of the rules would be useful.

Agreed?
@adangel what do you think?

@sebastianhaberey
Copy link
Author

So actually, you want to be able to define the set of pmd standard rules (and custom rules) for a project, separately from the version of PMD, the version of the PMD-Plugin and the version of IntelliJ, right?

Yes, that's it. "Project X has rule set Y" and that would stay untouched during updates etc.

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

No branches or pull requests

5 participants