FlexPMD is a tool that helps to improve code quality by auditing any AS3/Flex source directory and detecting common bad practices, such as:
A report is produced describing the violations of a given rule set. FlexPMD includes a rule set that is broad ranging and continually growing. It is also straightforward to create new rules and users are encouraged to do so.
FlexPMD can currently be invoked from:
An Eclipse/Flex Builder plug-in is under consideration.
FlexPMD is delivered with a set of standard rules for Flex/AS development. Each source file that is processed is checked against every rule.
There are various kinds of rules:
Regular expression based: the rule will process each file line-by-line searching for the specified pattern, and detecting possible violations.
Abstract Synthax Tree (AST) based: the rule will analyze the abstract syntax tree for an ActionScript class to detect possible violations. For example, detecting a deeply nested if-statement.
* XPath based: the rule will serialize the AST into an XML stream and then use an XPath expression to to detect possible violations.
The flowchart below illustrates the FlexPMD audit process:
Here is how FlexPMD is architected:
Now that you have the overview of how FlexPMD detects bad practices in your code base, you are ready to learn how to use FlexPMD on your own projects. Here are a number of tutorials to guide you:
If you have any requests for further tutorials, please submit these on the forum.