Skip to content
November 1, 2011 / edeustace

finding unused classes in your flex projects

I find it useful to clear out old unused classes from a flex project from time to time.

A few years back I wrote an Air app to do this. It had a UI and guided you through the process. I pulled it out there recently and while it still works, I thought it would be easier to have a ruby gem to do the same work and with less code.

The mechanism is the same. You specify the path to the source folder you wish to inspect and a set of link report xml files. It’ll then look through all the declarations in the link reports and see if they are within the source folder. This will give it a list of all the classes that are in use. Using this its easy to derive the list of unused classes. The gem will print out a list of unused classes, the air app will list them in the ui.

The gem usage is like so:

   gem install flex-source-inspector
   flex-source-inspector inspect path_to_src path_to_link_report

github repo is here

The air app repo is here.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: