3 Replies Latest reply on Nov 16, 2010 5:19 PM by injpix

    Code Metrics & Code Coverage - what do you use?

    Devtron Level 3



      What are some good tools to find source code metrics?


      I basically want to know how many lines of code are in my FLEX application. My guess is about 6,000 lines of code in 90 days.


      Id like to measure this more accurately than just adding up line counts manually. I'd preferably like to see AS code VS. MXML code, but firstly would like to get an idea of how many overall lines of code actually exist. Seperating the languages would just be a bonus I suppose


      I've dug around online and found a cool IDE plugin, that seems to be defunct?



      ^ Does anyone know how to make that work, or does anyone know of a working IDE plugin tool that can do this?


      I've seen some PYTHON scripts that do this, but am rather lost in implementing that as well.


      Any feedback is appreciated. I'd sure like to see a code count in here somewhere

        • 1. Re: Code Metrics & Code Coverage - what do you use?
          Devtron Level 3

          I looked into FLEXCover (http://code.google.com/p/flexcover/), which looks really great. Does anyone here use it?


          My  concern is that (from reading the setup documentation), that it is  required that you have to modify the FLEX SDK, and recompile that into  your application?


          Is this true? To get FlexCover setup, I need the entire SDK embedded in my application? Say it isnt so???




          "1. Create a copy of the Flex SDK that you will customize for Flexcover


          Flexcover uses a customized version of the Flex compiler and also requires a special Flex framework library. To use flexcover you must first create a version of the Flex 3 SDK that has been modified to include these components.  (It would be simpler if Flexcover could include a complete SDK that was already modified, but that file would be too large to be hosted on Google Code as a download.)  Once you have created this modified SDK, you can freely copy the SDK to other machines without repeating the initial creation process.


          To create the modified SDK, unzip a copy of the Flex 3.0 or Flex 3.2 SDKs into a directory on your computer that is separate from any existing Flex SDK installation you might have.  For simplicity and predictability, we recommend that you download either Adobe Flex SDK or  Adobe Flex SDK with this version of Flexcover, because these are the exact Flex SDK versions that the Flexcover modifications are based on.

          Howvever, you may use other SDKs if you wish.  Other Flex 3 SDK distributions are available from the

          Flex 3 SDK Downloads page, or you can modify a copy of some particular Flex 3 SDK version that you already have on hand (including the one that comes with Flex Builder 3).

          For clarity, it's a very good idea to give this SDK directory a descriptive name, for example flexcover-sdk-3.0."

          • 2. Re: Code Metrics & Code Coverage - what do you use?
            Devtron Level 3

            Is it safe to assume that nobody cares about Code Coverage in the FLEX world? LOL

            • 3. Re: Code Metrics & Code Coverage - what do you use?
              injpix Level 3

              I was under the assumption, hence the title of your posted, you were aware of Adobe ActionScript Code Coverage.  But I am not sure if this will provide you the total number of lines of code.  There is also FlexPMD and FlexMetrics.  I don't know much about these tools other then Code Coverage.  Code Coverage is a plug-in for Eclipse and you do not need to modify your SDK in order for it work.


              Currently, opensource.adobe.com seems to be having problems serving.  So you may need to search it via Google and retrieve the cached site.  I hope that helps.