This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245393 - [PMD] - Improve plugin for JavaScript as well
Summary: [PMD] - Improve plugin for JavaScript as well
Status: NEW
Alias: None
Product: third-party
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: issues@third-party
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-04 09:06 UTC by Christian Lenz
Modified: 2014-07-04 09:06 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Lenz 2014-07-04 09:06:27 UTC
To get more quality after using JSLint, it would be nice if we can have the same functionality, native inside PMD. I researched and I found out, that I can add rulesets to this plugin. I found rulesets for ecmascript and wanted to added but I got the NotSupportedException for add. After restart it works and when I remove the ruleset I got the NotSupportedException for remove.

After run I got this exception:

java.lang.NullPointerException
	at net.sourceforge.pmd.RuleSetFactory.parseSingleRuleNode(RuleSetFactory.java:309)
	at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:253)
	at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:209)
	at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:157)
Caused: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
[catch] at pmd.config.ConfigUtils.getAllAvailableRules(ConfigUtils.java:154)
	at pmd.config.ConfigUtils.createRuleList(ConfigUtils.java:77)
	at pmd.config.PMDOptionsSettings.getRuleList(PMDOptionsSettings.java:166)
	at pmd.RunPMDAction.constructRuleSets(RunPMDAction.java:300)
	at pmd.RunPMDAction.performScan(RunPMDAction.java:160)
	at pmd.RunPMDAction.performAction(RunPMDAction.java:268)
	at org.openide.util.actions.NodeAction.performAction(NodeAction.java:295)
	at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:129)
	at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:95)
	at org.openide.util.actions.ActionInvoker$ActionRunnable.actionPerformed(ActionInvoker.java:162)
	at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:109)
	at org.netbeans.modules.openide.actions.ActionsBridgeImpl.invokeAction(ActionsBridgeImpl.java:60)
	at org.openide.util.actions.ActionInvoker$ActionRunnable.doRun(ActionInvoker.java:153)
	at org.openide.util.actions.ActionInvoker$2.run(ActionInvoker.java:110)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)



Other exception happens, if I focused a file and say Run PMD, I think its not possible atm to run the PMD analyser for a single file or:

java.lang.NullPointerException
	at pmd.RunPMDAction.getDataObjects(RunPMDAction.java:356)
	at pmd.RunPMDAction.performAction(RunPMDAction.java:267)
	at org.openide.util.actions.NodeAction.performAction(NodeAction.java:295)
	at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:129)
	at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:95)
	at org.openide.util.actions.ActionInvoker$ActionRunnable.actionPerformed(ActionInvoker.java:162)
	at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:109)
	at org.netbeans.modules.openide.actions.ActionsBridgeImpl.invokeAction(ActionsBridgeImpl.java:60)
	at org.openide.util.actions.ActionInvoker$ActionRunnable.doRun(ActionInvoker.java:153)
	at org.openide.util.actions.ActionInvoker$2.run(ActionInvoker.java:110)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)