A new project at Adobe was released yesterday as Open Source Software, FlexPMD. The project runs a set of extensible rules over your AS3 or Flex source to detect bad coding practices and raise awareness that these issues exist. This is especially important for team development projects where code is being edited in mass and quality practices become essential.


The rule set within FlexPMD is extensible and you should customize rules to fit your project. If you want to detect undocumented methods or enforce naming conventions, feel free to write a rule for that, and better still share the rule (FlexPMD is open source).

Here is the FlexPMD Ruleset Creator. It is a Flex app that lets you export a set of rules custom to your app needs.

Once you have run FlexPMD against your project, you can load the output into the PMD Violations viewer to see all the issues.

FlexPMD also supports Hudson integration so with every build tests are run automatically and the team has a scorecard of quality throughout development. Seeing projects from this point of view really changes your perspective. I know on the Adobe Professional Services team FlexPMD has enabled teams to see deep within very large projects.

My favorite feature of FlexPMD is flagging unused code. It is so easy to create a variable or method that goes unused. Detecting these within your project is hard and deleting a method always feels like a risk unless you really know it is unused. Having a tool to flag these is great and better still it gives me the confidence to delete methods and properties with impunity.

I would like to thank Xavier Agnetti and the Adobe Professional Services team for making FlexPMD possible. Also there are a vast number of people who were involved in making this project open source within Adobe. It is really great seeing so many developers explore their projects from a quality perspective today over Twitter. I know that FlexPMD will have a long term impact on the quality of apps on the platform and help take things to the next level.

ted 🙂