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

Settings in misc.xml polluted with settings from random other projects #141

Open
zman0900 opened this issue Jun 9, 2023 · 2 comments
Open

Comments

@zman0900
Copy link

zman0900 commented Jun 9, 2023

Using PMD plugin 1.8.27 with IntelliJ 2023.1.2 on Mac. This behavior started either with this version of PMD plugin, or maybe the previous 1.8.26 version.

PMD plugin setting are often updating to include the custom ruleset files from what seems to be random other projects. The other projects are not necessarily all open at the time when this happens. In .idea/misc.xml, I will see the expected line like:

<option value="$PROJECT_DIR$/path/to/pmd.xml" />

But then randomly several other lines will appear like:

<option value="$PROJECT_DIR$/../other-project/path/to/pmd.xml" />
<option value="$PROJECT_DIR$/../other-project2/path/to/pmd.xml" />
<option value="$PROJECT_DIR$/../other-project3/path/to/pmd.xml" />

Every time I remove those extra settings, they come back minutes later.

This is annoying for multiple reasons:

  • The default .gitignore file created by new IntelliJ project doesn't exclude misc.xml, so seems to suggest that sharing it is expected.
  • The "custom rules" PMD menu often list multiple rulesets that aren't relevant to current project, and it can be impossible to tell which is which when multiple of them do not include a "name" attribute on their ruleset elements.

I don't have a good way to verify this, but I suspect this may have started with the fix for #105 - 8d27a0b

@mkeller-ergon
Copy link

This is very annoying. I use intellij for lots of projects, each one having its own definitions. Every time I want to start a PMD run manually, I have to select the configuration of the current project manually. Please stop just adding just every found configuration to every other configuration - this logic has no benefit and is probably a bug where pmd plugins share their state so they get mixed up when opening another project?

@jborgers
Copy link
Collaborator

Related: #182 and #197

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

No branches or pull requests

3 participants