Skip to main content
Inspiring
March 23, 2010
Question

Building custom ruleset

  • March 23, 2010
  • 1 reply
  • 1388 views

Is there a template that can be copied and tweaked based on the FlexPMD default ruleset?  The default ruleset seems to be geared towards applications rather than library/framework development and we'd like to tweak the rules so we can get a better picture of what we need to look at adjusting on the FlexUnit project.  FWIW, we've got our new sets of builds setup with FlexPMD, FlexCPD, and FlexMetrics on Hudson.  You can see an example @ http://flexunit.digitalprimates.net:8080/view/Flex%203.5/job/Demo-Versioned-Build/.

Any help is appreciated.

-Brian

This topic has been closed for replies.

1 reply

clintmodien
Known Participant
March 23, 2010

You can tweak the default ruleset with this tool... http://opensource.adobe.com/svn/opensource/flexpmd/bin/flex-pmd-ruleset-creator.html

Clint Modien

AIM\Y!M. cmodien

legrosbAuthor
Inspiring
March 27, 2010

@Clint - Sorry it took so long to get back to you.  Tried out the suggested tool, exported the file, and changed my call to look like the following:

<pmd sourceDirectory="${src.loc}" outputDirectory="${report.loc}" ruleset="${basedir}/pmd-ruleset.xml" />

After a test run, I got the following error followed by a stacktrace:

Couldn't find that class com.adobe.ac.pmd.rules.asdocs.AttributeAsDocMissingRule

Is this version of the tool missing rules for FlexPMD 1.0?  Is there anyway I can just edit a copy of the ruleset used by default by the task?  Any help is appreciated.

-Brian

Adobe Employee
March 27, 2010

Hi Brian,

The AttributeAsDocMissingRule is a new rule created for FlexPMD 1.1, released yesterday.

So you will need to get the latest bits to be get working this, or you need to remove the reference to this rule in the exported ruleset.

Best,

Xavier