Copy link to clipboard
Copied
From what I understand, to customize a ruleset for our development needs, we would have to modify, or add, to the java source and rebuild FlexPMD. Is that correct?
Thanks
Brenda
Copy link to clipboard
Copied
You may add your own rule :
http://opensource.adobe.com/wiki/display/flexpmd/Howtoaddyourown+rule
Or you may just configure the rules set:
http://opensource.adobe.com/svn/opensource/flexpmd/bin/flex-pmd-ruleset-creator.html
Cheers!
François
Copy link to clipboard
Copied
In the flex-pmd-ruleset-creator, from what I see, it appears that you can remove an existing rule but not change an exising rule or add a new rule. Both changing and adding rules require modifying the FlexPMD code. Is the correct?
In the 'How To Add Your Own Rule' page, it says "If you need to add a new resource in order to test your rule, please add it to the flex-pmd-test-resources/src/test/resources folder.". I don't see any such folder in the project ? Has that been changed?
FlexPMD consists of both Java and ActionScript classes?
thanks
Brenda
Copy link to clipboard
Copied
The flex-pmd-ruleset-creator is just creating a rules subset xml file from an existing flexpmd rules set.
In order to create a rule, you need either to write some java code and/or write some xml.
To get you started on that; two options :
Read the doc again : http://opensource.adobe.com/wiki/display/flexpmd/Howtoaddyourown+rule
Download this great sample of flexpmd extension:
http://www.vanhulzenonline.nl/techblog/moreflexpmdrules
That should be enough.
Cheers,
François
PS: the folder flex-pmd-test-resources/src/test/resources is indeed under flexmpd svn structure, you only need it if you want to do unit test and eventually commit a patch to the flexpmd team.
Copy link to clipboard
Copied
As Francois explained, the flex-pmd-ruleset-creator helps creating a ruleset from known rules.
If you want to use some non-official rules, you will need to had the jar in the class-path, and then reference some extended rules in your ruleset.
I hope this helps
Xavier
Copy link to clipboard
Copied
Thank you both for all your information. It has really helped. We are new to Adobe Flash/Flex development. We previously developed in Java, C, C++, C#. Our target is an AIR application and there are some internal coding standards that we want to enforce and FlexPMD looks like a good tool for that.
Thanks again!
Brenda