Tom Copeland's Recent Posts

RSS Feeds

« JDeveloper PMD plugin release | Main | Finding copy/pasted code in a Rails app »

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d83451d3c069e200e550765e308833

Listed below are links to weblogs that reference PMD 4.1 released!:

» Where can you buy adipex without a prescription. from Buy adipex without prescription.
Buy adipex p 37.5mg no prescription. Buy adipex without a prescription. [Read More]

Comments

Hello!

I'm using PMD with IntelliJ IDEA.

I tried it as a plugin, but it was always throwing exceptions inside IDEA.

So, I tried to use it as an External tool, now I need some help: in your instructions, what does the argument 'ideaj' stands for? Is it a renderer for IDEA? As far I can see, there are only 4 renderers: text, xml, html and nicehtml.

Thanks in advance,
Rui Baeta

PS: congrats for your good work!

@rui, thanks for the note, I need to check the pending comments more often. Yup, "ideaj" maps to a Renderer implementation - "net.sourceforge.pmd.renderers.IDEAJRenderer".

I haven't found a way to get the total number of code and the number of duplicate lines of code within a project.

Am I missing something?

Thanks,

@dale, you may want to ask about this on the PMD forums. But I think the current ruleset only provides rules to trigger problem reports when there are more than a certain number of lines of code in a class or a method. You could certainly write your own rule to extract that information, though.

Hi

i am using JDeveloper 10.1.3.3.0.4157 and PMD 4.2.4.2.0.

I dont no how to use this pmd tool in jdeveloper. I am new to this pmd tool.

while runing the pmd i am always getting the below error.

please help me ////

net.sourceforge.pmd.PMDException: Error while processing D:\Projects\MOJ-UAE\ePortalCodeMaintenance\ViewController\src\com\crimsonlogic\legal\mojuae\eportal\committee\managedbean\CommitteeBean.java
at net.sourceforge.pmd.PMD.processFile(PMD.java:132)
at net.sourceforge.pmd.PMD.processFile(PMD.java:75)
at net.sourceforge.pmd.PMD.processFile(PMD.java:172)
at net.sourceforge.pmd.PMD.processFile(PMD.java:189)
at net.sourceforge.pmd.PMD.processFile(PMD.java:230)
at net.sourceforge.pmd.jdeveloper.Plugin.runPmd(Plugin.java:218)
at net.sourceforge.pmd.jdeveloper.Plugin.handleEvent(Plugin.java:142)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:525)
at oracle.ide.controller.IdeAction$1.run(IdeAction.java:772)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:789)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:498)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.lang.RuntimeException: org.jaxen.XPathSyntaxException: Expected: )
at net.sourceforge.pmd.rules.XPathRule.getRuleChainVisits(XPathRule.java:90)
at net.sourceforge.pmd.CommonAbstractRule.usesRuleChain(CommonAbstractRule.java:346)
at net.sourceforge.pmd.AbstractRuleChainVisitor.initialize(AbstractRuleChainVisitor.java:123)
at net.sourceforge.pmd.AbstractRuleChainVisitor.visitAll(AbstractRuleChainVisitor.java:46)
at net.sourceforge.pmd.RuleChain.apply(RuleChain.java:67)
at net.sourceforge.pmd.RuleSets.apply(RuleSets.java:133)
at net.sourceforge.pmd.PMD.processFile(PMD.java:126)
... 36 more
Caused by: org.jaxen.XPathSyntaxException: Expected: )
at org.jaxen.BaseXPath.(BaseXPath.java:136)
at org.jaxen.BaseXPath.(BaseXPath.java:159)
at net.sourceforge.pmd.rules.XPathRule.createXPath(XPathRule.java:209)
at net.sourceforge.pmd.rules.XPathRule.initializeXPathExpression(XPathRule.java:160)
at net.sourceforge.pmd.rules.XPathRule.getRuleChainVisits(XPathRule.java:87)
... 42 more

@bharathi - hm, someone else is maintaining this plugin now, can you post a note on the PMD forums here?
http://sourceforge.net/forum/forum.php?forum_id=188192

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Comments are moderated, and will not appear until the author has approved them.