| Author |
Message |
|
fmotagarcia
Member
Joined: Thu Jul 30, 2009 12:41 pm Posts: 12
|
 FlashdevelopPMD
DescriptionIntegrates flexPMD into Flashdevelop 3 Installation1. Download flashdevelopPMD from http://www.kemelyon.com/flashdevelop/flashdevelopPMD.zip2. Copy PMD.dll into the plugins folder of your FD Application Files. 3. Download flexPMD from Adobe Labs ( http://opensource.adobe.com/wiki/displa ... /Downloads) and extract to your disk. Set "PMD jar Location" in Tools -> Settings -> FlexPMD to your "flex-pmd-command-line-1.0.RC3.jar" UsagePress Ctrl-Shift-A to run FlexPMD in current Project. This version only checks code inside the "src" folder, so you don't see warnings in your libraries. To use your own ruleset, set "PMD Ruleset" in Tools -> Settings -> FlexPMD This plugin has been included in FD4.
Last edited by fmotagarcia on Wed Sep 07, 2011 10:30 pm, edited 1 time in total.
|
| Mon Sep 07, 2009 8:27 am |
|
 |
|
Canab
Member
Joined: Mon Oct 16, 2006 12:02 am Posts: 333 Location: Lviv, Ukraine
|
 Re: FlashdevelopPMD
It is a very helpful plugin, thanks. But I got a lot of "stupid" warnings. How can I customize rule sets? Should I manually edit jars or just put somewhere xmls with rulesets?
|
| Mon Sep 07, 2009 10:10 am |
|
 |
|
Canab
Member
Joined: Mon Oct 16, 2006 12:02 am Posts: 333 Location: Lviv, Ukraine
|
 Re: FlashdevelopPMD
OK, Im Already explained how to set custom rules. But I still have some issue. I have extracted xmls with rules in custom folder and set this folder in plugin settings for custom rule sets. (all_flex.xml)
But I need set all references in all_flex.xml to absolute file paths of each ruleset.
Maybe it need to run java process with setting working folder to that custom rulesets folder.
|
| Mon Sep 07, 2009 10:41 am |
|
 |
|
Canab
Member
Joined: Mon Oct 16, 2006 12:02 am Posts: 333 Location: Lviv, Ukraine
|
 Re: FlashdevelopPMD
Also, some warnings are displaying in output window, but not appears in result window. For example: Code: Running: java -Xmx256m -jar "D:\development\flex-pmd\flex-pmd-command-line-1.0.RC3.jar" -s "D:\chobots\chobotsgames\gameRacer\src" -o "D:\chobots\chobotsgames\gameRacer\src" -r "D:\development\flex-pmd\as3-rules\!as3.xml" D:/chobots/chobotsgames/gameRacer/src/gameRacer/race/GameScene.as:24: col: 23: ArrayElementType metadata is not specified for this array-type field (BONUSES). D:/chobots/chobotsgames/gameRacer/src/gameRacer/race/GameScene.as:36: col: 14: ArrayElementType metadata is not specified for this array-type field (items). D:/chobots/chobotsgames/gameRacer/src/gameRacer/Player.as:29: col: 14: ArrayElementType metadata is not specified for this array-type field (rows). D:/chobots/chobotsgames/gameRacer/src/gameRacer/race/StageController.as:165: col: 20: This private method (processPlayer) is used but its content is empty. D:/chobots/chobotsgames/gameRacer/src/gameRacer/race/StageController.as:89: col: 8: This variable (dt) is not used. D:/chobots/chobotsgames/gameRacer/src/gameRacer/View.as:48: col: 4: This parameter (soundClass) of this function is not used.
|
| Mon Sep 07, 2009 12:14 pm |
|
 |
|
xMCNUGGETx
Member
Joined: Wed Apr 19, 2006 12:39 pm Posts: 303
|
 Re: FlashdevelopPMD
Saw some posts about FlexPMD and was going to suggest someone create a plugin. Glad to see someone jumped on it. Nice work so far.
|
| Mon Sep 07, 2009 2:09 pm |
|
 |
|
tangent
Member
Joined: Thu Sep 08, 2005 8:32 pm Posts: 301 Location: Virginia
|
 Re: FlashdevelopPMD
Sweet! It would be super nice if I can click at the output, and the plugin would jump to the corresponding code.
_________________
Open source makes me open my wallet for an open world of goods.
|
| Mon Sep 07, 2009 3:39 pm |
|
 |
|
fmotagarcia
Member
Joined: Thu Jul 30, 2009 12:41 pm Posts: 12
|
 Re: FlashdevelopPMD
Hi, I'll post the code as soon as possible, so you people can see if you can add new features 
|
| Mon Sep 07, 2009 5:55 pm |
|
 |
|
ares623
Member
Joined: Thu May 15, 2008 4:14 pm Posts: 52
|
 Re: FlashdevelopPMD
Hi, first of all, thanks for this useful plugin. Great work. like Canab said, some reports in Output panel are not displaying in Result panel. also, where is the PMD.xml file saved? @tangent, you can go to the Result panel for that. 
_________________ I heart FD
|
| Tue Sep 08, 2009 1:07 am |
|
 |
|
JimmyDeemo
Member
Joined: Tue Sep 08, 2009 8:15 am Posts: 77
|
 Re: FlashdevelopPMD
Hi, i'm trying to get this plugin working but i'm having a few problems.
When i try to run the plugin i get these errors;
The directory name C:\Projects\TestProj\src is invalid.
at System.IO.FileSystemWatcher.set_Path(String value) at PMD.CodeAnalyzer.WatchFile(String filename) at PMD.CodeAnalyzer.Analyze(String pmdPath, String projectPath, String pmdRulset)
Now i think that its something to do with the paths i've set for the plugin which are these;
PMD Jar Location : C:\Flex PMD\flex-pmd-command-line-1.0.RC3.jar PMD Ruleset Location: C:\Flex PMD\flex-pmd-ruleset-1.0.RC3.jar
But they seem like they are right. I'm using 3.0.3 RTM release of flash develop, any help much appreciated.
|
| Tue Sep 08, 2009 8:19 am |
|
 |
|
fmotagarcia
Member
Joined: Thu Jul 30, 2009 12:41 pm Posts: 12
|
 Re: FlashdevelopPMD
@canab, i'll look into those results, and try to figure out why they don't appear.
@ares623, flexPMD already has a default ruleset, so you don't need a PMD.xml. You can create your own using the ruleset creator at Adobe Labsand set the path to it in the plugin settings.
@JimmyDemo, this version of the plugin only checks code in the src folder of your project (as mentioned in my first post and inside the README.txt). I'd like to had an option to chose the directory you want to run PMD for each project.
|
| Tue Sep 08, 2009 8:53 am |
|
 |
|
JimmyDeemo
Member
Joined: Tue Sep 08, 2009 8:15 am Posts: 77
|
 Re: FlashdevelopPMD
@fmotagarcia: Thanks for the speedy reply. So it can't check classes and files that are elsewhere, sorry i miss understood that part.
Is this a feature that you (or others) would like to add at some point? I think it would be pretty useful, but i really don't know the in's and out's for what is involved.
|
| Tue Sep 08, 2009 9:49 am |
|
 |
|
Arnaud
Member
Joined: Mon Jun 16, 2008 10:12 pm Posts: 8
|
 Re: FlashdevelopPMD
Congratulations for this plugin !
_________________ http://afoucal.free.fr
|
| Wed Sep 09, 2009 5:46 pm |
|
 |
|
ricick
Member
Joined: Sun Apr 23, 2006 2:55 am Posts: 204 Location: Sydney, Australia
|
 Re: FlashdevelopPMD
Not a huge deal as you can change it, but the default shortcut clashes with the fold all shortcut.
_________________ http://www.quizmash.com
|
| Thu Sep 10, 2009 12:32 am |
|
 |
|
ares623
Member
Joined: Thu May 15, 2008 4:14 pm Posts: 52
|
 Re: FlashdevelopPMD
@fmotagarcia I mean the xml file that is generated when running FlexPMD, the file where the errors are reported.
_________________ I heart FD
|
| Sun Sep 13, 2009 2:00 am |
|
 |
|
fmotagarcia
Member
Joined: Thu Jul 30, 2009 12:41 pm Posts: 12
|
 Re: FlashdevelopPMD
@ares623 the pmd.xml is created inthe project folder and deleted after the results are parsed.
|
| Sun Sep 13, 2009 11:40 am |
|
|