PMDPlugin

Compatible with  IntelliJ IDEA
29.03.2016
88 832
A plugin to run static analysis using PMD in intelliJ.

Download plugin

Version

Update date

Recent change notes

Updated to support 2016.1

General usage instructions

PMD Plugin integrates PMD (http://pmd.sourceforge.com) to intelliJ. It supports all the pre defined rulesets as well as custom rulesets. The user can run pmd on a single or set of files/folders and see the results in intelliJ. To run the predefined rulesets, go to Tools -> PMD -> PreDefined menu. PMD supports custom ruleset file, to configure goto settings -> PMD and add the rule set files that are required.
22.04.2015
I get an error when I try to configure the plugin to use my ruleset: "The selected file is not a valid PMD ruleset: Couldn't find the class Can't find resource 'rulesets/ecmascript/basic.xml' for rule 'AssignmentOperand'. Make sure the resource is a valid file or URL and is on the CLASSPATH." then it lists my classpath. " Then it lists my classpath. I validated my ruleset with the xsd and it is valid. What should I add to my classpath or is this a bug?
29.01.2015
Do you plan to add real-time scanning?
05.04.2014
The plugin is updated to work with Idea 13. Please report any issues at https://github.com/amitdev/PMD-Intellij/issues instead of using the comments.
Anonymous
02.02.2014
I guess it's about time to update the plugin :) Just ran it on IDEA 13, and that's what I got: java.lang.NullPointerException at com.intellij.plugins.bodhi.pmd.PMDProjectComponent.setupToolWindow(PMDProjectComponent.java:160) at com.intellij.plugins.bodhi.pmd.PMDInvoker.runPMD(PMDInvoker.java:69) at com.intellij.plugins.bodhi.pmd.PMDProjectComponent$1.actionPerformed(PMDProjectComponent.java:99) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:162) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:261) at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:916) at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:231) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:104) at com.intellij.ui.plaf.beg.BegMenuItemUI.a(BegMenuItemUI.java:512) at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:44) at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:532)
15.02.2012
Hi again,

In the window with the PMD-results, I can see the description of the PMD-finding but I need the name if I want to place a @SuppressWarning on it. Now I have to google the description to find the name.

Maybe the name can be showed next to the description or as a tooltip?

Cheers
Lessy
11.01.2012
Thank you for this plugin. It works fine but I have a few points (I have 11.0.1 Ultimate):
- Is ti possible to assign a hotkey to a custom ruleset?
- If I mark a violation in the PMD-Toolwindow, I can doubleclick to get to the sourcefile. However Enter or F4 does not take me there (I prefer to use the keyboard). As workaround I can set \"Autoscroll to source\" but that setting seems not persisted

Regards
Lessy
04.08.2011
Sorry for the delay - Updated Now to work with Idea 10+
03.08.2011
Has not been updated for a long time - always fails with an Exception. Never managed to run it on IntelliJ 10.
28.07.2011
Same exception here with IntelliJ IDEA 10.5.1
Anonymous
13.04.2011
Great plugin! It's quite easy to use, and I haven't encountered any errors in it.
Anonymous
02.03.2011
i have the same exception even after updating to idea 10.0.2
Anonymous
02.03.2011
i have the same exception even after updating to idea 10.0.2
Anonymous
17.02.2011
Looking for an update to avoid the null pointer on IDEA 10.1.

I use this tool as part of my daily workflow. Come on JetBrains, stop breaking plugins with new releases!!

Where the is author?
05.02.2011
same exception here, IDEA 10.0.1
Anonymous
12.01.2011
IntelliJ 10.0.1

Install plugin and restart IntelliJ

null
java.lang.NullPointerException
at com.intellij.plugins.bodhi.pmd.OpenApiAdapter.runMethod(OpenApiAdapter.java:127)
at com.intellij.plugins.bodhi.pmd.OpenApiAdapter.createCollapseAllAction(OpenApiAdapter.java:110)
at com.intellij.plugins.bodhi.pmd.PMDResultPanel.createActions(PMDResultPanel.java:247)
at com.intellij.plugins.bodhi.pmd.PMDResultPanel.(PMDResultPanel.java:93)
at com.intellij.plugins.bodhi.pmd.PMDProjectComponent.projectOpened(PMDProjectComponent.java:124)
at com.intellij.openapi.project.impl.ProjectImpl.c(ProjectImpl.java:338)
at com.intellij.openapi.project.impl.ProjectImpl.access$200(ProjectImpl.java:72)
at com.intellij.openapi.project.impl.ProjectImpl$MyProjectManagerListener.projectOpened(ProjectImpl.java:373)
at com.intellij.openapi.project.impl.ProjectManagerImpl$2.projectOpened(ProjectManagerImpl.java:145)
at com.intellij.openapi.project.impl.ProjectManagerImpl.d(ProjectManagerImpl.java:988)
at com.intellij.openapi.project.impl.ProjectManagerImpl.openProject(ProjectManagerImpl.java:382)
at com.intellij.openapi.project.impl.ProjectManagerImpl.loadAndOpenProject(ProjectManagerImpl.java:438)
at com.intellij.openapi.project.impl.ProjectManagerImpl.loadAndOpenProject(ProjectManagerImpl.java:421)
at com.intellij.ide.impl.ProjectUtil.openProject(ProjectUtil.java:162)
at com.intellij.ide.RecentProjectsManager.doOpenProject(RecentProjectsManager.java:48)
at com.intellij.ide.RecentProjectsManagerBase$MyAppLifecycleListener.appStarting(RecentProjectsManagerBase.java:297)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:101)
at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:183)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:175)
at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:167)
at com.intellij.util.messages.impl.MessageBusImpl.access$000(MessageBusImpl.java:40)
at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:106)
at $Proxy34.appStarting(Unknown Source)
at com.intellij.idea.IdeaApplication.b(IdeaApplication.java:227)
at com.intellij.idea.IdeaApplication.access$400(IdeaApplication.java:50)
at com.intellij.idea.IdeaApplication$IdeStarter$3.run(IdeaApplication.java:192)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:319)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:652)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:505)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:404)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Please  sign in  to leave a comment.