MAX FlexPMD session recording and slides are available

The session that Xavi and I gave at MAX has been recorded.

You will find the video here and the slides up here

I need to make an erratum, though. François wanted me to relay this :

“Great FlexPMD presentation at MAX! congrats ! And thanks for your slide on PMD and the link to the presentation I did with Romain at the ParisJUG and the Parisian Linux Conference. But the big acknowledgement should go to Tom Copeland, Romain Pelisse, Ryan Gustafson, Xavier Le Vourch and many others. I did work with Romain on PMD, and contributed a few lines of code to the XRadar project, but that’s all. Here is the correction made.”

FlexPMD 1.2 released

The FlexPMD team is thrilled to announce that after 6 months, version 1.2 has left the building:

We and the community added a bunch of rules related to naming conventions, security, touch screens.
A new sample project has been created if you want to create your own rules.
You can now load a ruleset Maven from an URL.

Check out the latest bits here

Another great news: Xavi and I will be giving a session at MAX later this year about Flash based projects and quality management.

Here is the release note:

Bug resolved

  • [FLEXPMD-173] – UnusedPrivateMethod – reference in attribute initialization
  • [FLEXPMD-195] – UnusedLocalVariable rule fails to notice use in a particular function
  • [FLEXPMD-152] – PackageCase rule incorrectly reports upper case package names for mxml files
  • [FLEXPMD-167] – ASDoc rules failing when there is metadata between asdoc comment and attributes/methods/classes
  • [FLEXPMD-181] – Looks like FlexMetrics does not count properly static methods
  • [FLEXPMD-183] – Cannot suppress ExcessiveImport violation
  • [FLEXPMD-170] – OverLongLineRule fails if line length is equal to threshold
  • [FLEXPMD-160] – problems with some of the event rules
  • [FLEXPMD-120] – FlexPMD View remains blank
  • [FLEXPMD-130] – Runtime exception when removing markers
  • [FLEXPMD-126] – FlexPMD plugin is difficult to configure
  • [FLEXPMD-127] – FlexPMD fails silently if there's a space in the project path

New rules


  • [FLEXPMD-172] – Fill externalInfoUrl in the XML reports
  • [FLEXPMD-180] – recognize //NO PMD
  • [FLEXPMD-200] – Support NO PMD on mxml
  • [FLEXPMD-151] – apply the UnboundTypeInMetaData rule to event metadata in mxml files
  • [FLEXPMD-169] – reference to a variable binding from its initializer should be a strict error
  • [FLEXPMD-154] – Ruleset Exclude Patterns Are Ignored
  • [FLEXPMD-207] – Remove readonly attribute in the sourceDirectory of the Maven plugin
  • [FLEXPMD-205] – AvoidInstanciationInLoop Should Not Default to Severity "Error"

New Feature

  • [FLEXPMD-204] – [Maven] Add the ability to load a custom ruleset from a URL
  • [FLEXPMD-175] – ParameterizedRegExpBasedRule
  • [FLEXPMD-111] – Add a way to un-delete deleted rules
  • [FLEXPMD-78] – Math.floor, Math.ceil, Math.round are slow, prefer using int instead (performance)
  • [FLEXPMD-208] – Create a standalone project for create customized rules
  • [FLEXPMD-171] – add failOnRuleViolation option



FlexPMD 1.1 / FlexCPD 1.1 / FlexMetrics 1.1 released

A new update of FlexPMD 1.1 has been released yesterday evening!

While several bugs have been fixed and around 10 new rules added (see release note here), the main enhancement of this release has been the collaboration with SonarSource in order to develop a Flex plugin for Sonar

An update on the Eclipse plugin will occur soon.

I hope you will like the work we’ve been doing!


FlexPMD 1.0 + FlexCPD 1.0 + FlexMetrics + Eclipse plugin released !

FlexPMD 1.0 is out.
FlexCPD 1.0 is out (and improved).
FlexMetrics 1.0 is also out.

and guess what, the Eclipse plugin is also out.

You will find more info on the wiki

FlexPMD 1.0-RC5 released and FlexCPD

I am thrilled to announce the release FlexPMD RC5, which is mainly a bug fix version. The list of the fixed issues can be found here.

Part of that release, we added a new sub-project: FlexCPD which stands for Flex Copy & Paste Detector.

You will be able to find duplications in your Flash-based project. More info here

At the moment FlexCPD can be invoked from:

  • The command-line
  • Ant
  • Maven

There may even be a Eclipse view for FlexCPD…. More on that later.

You can download the latest archives here

Cairngorm 3 is out

I have the pleasure to announce that Cairngorm 3 is finally out.

You can find more information on Alex Ulhmann’s blog

Check it out!


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