Archive for September, 2009

FlexPMD 1.0-RC4 released

I’m pleased to announce that FlexPMD 1.0-RC4 has been released.

You can find resolved issues here (you need to be logged in to view the related issues)

On top of the resolved bugs, one feature has been added:
You can now append // NO PMD ruleName specifying the rule you want to ignore on that line.

You can find the latest download here.

Happy cleaning!


FlexPMD: Tips and Tricks

While RC4 is on its way, I would like to share some tips about FlexPMD:

Default ruleset
Some people were asking why there were no default rulesets in the archives. There is a simple reason: if you don’t specify any ruleset, the default one is loaded. The default ruleset contains every rule implemented.

Acknowledge violations
FlexPMD finds “possible” problems. It is possible that a violation for FlexPMD, has been done on purpose by the developer. So if you want to acknowledged a violation, just append // NO PMD at the end of the line. This specific violation will be ignored by FlexPMD.

Maven repository
While FlexPMD artefacts, are not (yet) deployed on a public repository, if you want to used FlexPMD with Maven, you will need to download the sources and install the artifacts in your repository.

Fine tuned ruleset
When using the ruleset creator, you can either remove a rule, modify it (changing the message, the description, or its level).

Let’s say you decide, that if any rule with a high level is broken, then you want the build to be refused.

There is an extra argument in the Maven target, and the Ant task, called failOnError, which makes the build failing if an error violation is found.

Then in your favorite Continuous Integration server, the build would be broken just like if there is a compilation error, or a failing unit-test.

Let’s build high quality software…

Load pmd results directly in the violations viewer

I’ve been asked this question several times today:
Is it possible to load pmd results file directly in the violations viewer?

By default, there is a first screen in the violations viewer where you load your results file.
But if you type[URL of the report]/pmd.xml, the report will be loaded straight ahead.



FlexPMD release on

It has been a while since I posted on this blog. But I have a great new to announce:
FlexPMD is released!

What is FlexPMD?

FlexPMD uses a part of PMD, its Java well known counterpart.

Over the last year or so, I’ve been leading an internal project at Adobe Technical Services. This project, FlexPMD, is meant to automatically detect code anti-patterns, code smells, common bad practices in a Flash/Flex based source code.

Originally, FlexPMD has been created to automate low-level code audits, so that consultants can focus on higher level architectural issues. It ended up to be rather advanced anti-patterns detector.

More information here

Currently, the project contains 84 rules, like detecting unused or empty pieces of code, complex methods with cyclomatic complexity, misnamed symbols, architectural bad practices like view components referenced from the model, or internal classes accessed from an authorized package, …

You can find more information here

If you want to check out the entire ruleset, please launch this application, which is also used for exporting
your own ruleset

How to use it

FlexPMD can be invoked from either the command line, Ant, Maven or Mac OSX Automator. An Flash Builder plugin is under consideration.

FInd more information here

Why opensourcing it?
By essence, the ruleset is meant to grow. While Adobe will continue to contribute on the ruleset, we look forward to having the community checking out the source code, and building their own rule, to meet your project/architect requirements.
More info here