Menu

#1133 Eclipse workspace relative path to ruleset.xml

Eclipse-Plugin
closed
nobody
Eclipse
3-Major
Feature-Request
PMD Plug-in 4.0.1.v20130811-0001
2014-12-03
2013-09-19
Egon
No

It would be helpful, if an Eclipse-workspace relative path could be used to refer to a ruleset, e.g. that serveral Eclipse projects can refer to the same ruleset.

An absolute path is not helpful for teams and "../" to another project does not seem to work with Eclipse 4.3 (at least when a start-option like "eclipse.exe -data %RCP_WORKSPACE%" is configuring a workspace location different from the location of the projects).

A solution could be analogous to Eclipse Checkstyle configuration: http://eclipse-cs.sourceforge.net/advanced_configtypes.html
- Project Relative Configuration
- Remote Configuration

Or realtive to path variables like ${workspace_loc} and ${project_loc}, see:
http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Fconcepts%2Fconcepts-exttools.htm
http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Fconcepts%2Fcpathvars.htm

This request is probably related to:
- #15 "Use URL for retrieving rulesets": https://sourceforge.net/p/pmd-eclipse/feature-requests/15/
- Discussion about "<ruleSetFile>..\pmd.ruleset.xml</ruleSetFile>": http://sourceforge.net/p/pmd-eclipse/discussion/457016/thread/1ebb7a4a

PMD Plug-in 4.0.1.v20130811-0001
Use the ruleset configured in a project file: ../mySolutions.ruleset
IllegalArgumentException: Path must include project and resource name: /mySolutions.ruleset
at net.sourceforge.pmd.eclipse.runtime.properties.impl.ProjectPropertiesImpl.getResolvedRuleSetFile(ProjectPropertiesImpl.java:268)
at net.sourceforge.pmd.eclipse.runtime.properties.impl.ProjectPropertiesImpl.isRuleSetFileExist(ProjectPropertiesImpl.java:260)
at net.sourceforge.pmd.eclipse.ui.properties.PMDPropertyPageController.checkProjectRuleSetFile(PMDPropertyPageController.java:239)
at net.sourceforge.pmd.eclipse.ui.properties.PMDPropertyPageController.performOk(PMDPropertyPageController.java:147)

Discussion

  • hkais

    hkais - 2013-11-23

    same issue here. I am working in bigger teams, right now I am duplicating all pmd rules in every project into .pmd

    My bug is also related with #1051 since this was my try to configure it for the team.
    Developers, please fix this!

     
  • Andreas Dangel

    Andreas Dangel - 2014-02-01
    • status: open --> closed
    • Module: PMD --> Eclipse
    • Milestone: New Tickets --> Eclipse-Plugin
     
  • Andreas Dangel

    Andreas Dangel - 2014-02-01

    This will be fixed/implemented with https://github.com/pmd/pmd/pull/36

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.