View unanswered posts | View active topics



Reply to topic  [ 35 posts ]  Go to page 1, 2, 3  Next
FlashdevelopPMD 
Author Message
Member

Joined: Thu Jul 30, 2009 12:41 pm
Posts: 12
Description

Integrates flexPMD into Flashdevelop 3

Image

Installation

1. Download flashdevelopPMD from http://www.kemelyon.com/flashdevelop/flashdevelopPMD.zip

2. 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"

Usage

Press 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
Profile
Member

Joined: Mon Oct 16, 2006 12:02 am
Posts: 336
Location: Lviv, Ukraine
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
Profile WWW
Member

Joined: Mon Oct 16, 2006 12:02 am
Posts: 336
Location: Lviv, Ukraine
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
Profile WWW
Member

Joined: Mon Oct 16, 2006 12:02 am
Posts: 336
Location: Lviv, Ukraine
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
Profile WWW
Member

Joined: Wed Apr 19, 2006 12:39 pm
Posts: 311
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
Profile
Member

Joined: Thu Sep 08, 2005 8:32 pm
Posts: 301
Location: Virginia
Sweet! It would be super nice if I can click at the output, and the plugin would jump to the corresponding code.

_________________
Image Open source makes me open my wallet for an open world of goods.


Mon Sep 07, 2009 3:39 pm
Profile YIM WWW
Member

Joined: Thu Jul 30, 2009 12:41 pm
Posts: 12
Hi,

I'll post the code as soon as possible, so you people can see if you can add new features :D


Mon Sep 07, 2009 5:55 pm
Profile
Member

Joined: Thu May 15, 2008 4:14 pm
Posts: 52
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
Profile
Member

Joined: Tue Sep 08, 2009 8:15 am
Posts: 77
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
Profile
Member

Joined: Thu Jul 30, 2009 12:41 pm
Posts: 12
@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
Profile
Member

Joined: Tue Sep 08, 2009 8:15 am
Posts: 77
@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
Profile
Member

Joined: Mon Jun 16, 2008 10:12 pm
Posts: 8
Congratulations for this plugin !

_________________
http://afoucal.free.fr


Wed Sep 09, 2009 5:46 pm
Profile
Member

Joined: Sun Apr 23, 2006 2:55 am
Posts: 204
Location: Sydney, Australia
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
Profile WWW
Member

Joined: Thu May 15, 2008 4:14 pm
Posts: 52
@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
Profile
Member

Joined: Thu Jul 30, 2009 12:41 pm
Posts: 12
@ares623 the pmd.xml is created inthe project folder and deleted after the results are parsed.


Sun Sep 13, 2009 11:40 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 35 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.