Blog

a great conversation starts with a great topic

This is a public Blog  publicRSS

Entry

    Using Flex PMD in FlashDevelop 3
    Entry posted 09/28/09 by swfgeek , tagged Development
    3824 Views
    Title:
    Using Flex PMD in FlashDevelop 3
    Entry:

    FlashDevelop 3 Adobe recently made available Flex PMD a tool that lets you keep track of your code bad practices and helps you by auditing your source directory and displaying common errors 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 your own new rules. Originally Flex PMD can be called from: Ant, The Command Line and Maven, but thanks to the FlashDevelop (FD3 from now on ) community a plugin has been made available that lets you use FlexPMD in the FD3 IDE and throws the result right in the Output and Results window of FD3. flexpmdinfd3

    Installation 1. Download flashdevelopPMD from http://www.kemelyon.com/flashdevelop/flashdevelopPMD.zip

    fdsettings

    2. Copy PMD.dll into the plugins folder of your FD Application Files.

    fdplugins

    adobeos

    3. Download flexPMD from Adobe Labs ( http://opensource.adobe.com/wiki/displa ... /Downloads) and extract to your disk.  Set "PMD jar Location" in Tools -> Settings -> FlexPMD to your "flex-pmd-command-line-1.0.RC3.jar"

    flexpmdlocation

    Usage Press Ctrl-Shift-A to run FlexPMD in current Project. This version only checks code inside the "src" folder, so you don't see warnings in your libraries. To use your own ruleset, set "PMD Ruleset" in Tools -> Settings -> FlexPMD Thanks again to the FlashDevelop community for spending time in making this useful plugins.

    Tags:
    EXAMPLES ,FLASHDEVELOP , FlexPMD ,plugins , TUTORIALS

    Copyright © 2009 Adobe Systems Incorporated. All rights reserved.

    Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy (updated 07-08-2008).

    Powered by HiveLive