About

Table of contents

  • About FlexPMD
  • How Does It Work?
  • FlexPMD Tutorials

About FlexPMD

FlexPMD is a tool that helps to improve code quality by auditing any AS3/Flex source directory and detecting common bad practices, such as:

  • Unused code (functions, variables, constants, etc.)
  • Inefficient code (misuse of dynamic filters, heavy constructors, etc.)
  • Over-complex code (nested loops, too many conditionals, etc.)
  • Over-long code (classes, methods, etc.)
  • Incorrect use of the Flex component lifecycle (commitProperties, etc.)

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:

  • The command line
  • Maven
  • Ant

An Eclipse/Flex Builder plug-in is under consideration.

How Does It Work?

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:

FlexPMD Tutorials

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.

### FlexPMD - [ Home ][1] - [ About][2] - [ FlexCPD][3] - [ FlexMetrics][4] - [ Eclipse PlugIn][5] - [ Downloads][6] - [ Source][7] - [ Bug Database][8] - [ Submitting a Patch][9] - [ Developer Documentation][10] - [ Forums][11] - [ License][12]




Discussion


  • Anonymous
    2014-03-04

    Post awaiting moderation.

  • Anonymous
    2014-05-02

    Post awaiting moderation.


Anonymous


Cancel   Add attachments