Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > General > Best Practices

Reply
 
Thread Tools Rate Thread Display Modes
Old 04-17-2008, 08:07 PM   #1
eeidfn
Registered User
 
Join Date: Apr 2008
Posts: 1
Default Static Code Analysis Tool for ActionScript

Hi,

We are trying to use/find a tool that can be run before code review that warns for some of these (there may be others):
· Naming conventions are violated.
· Not using get / set methods.
· Inline methods are used.
· Function does not fit in one page (for e.g. function is more than 60 lines)
· Not using blocks in if, else, for, ...
· Using literals instead of constant variables.

The basic purpose of the whole thing is to be able to simplify maintenance, minimize the risk of making commonly known errors, increase readability, and create a uniform appearance of code and classes.

Thanks,
/eeidfn
eeidfn is offline   Reply With Quote
Old 04-22-2008, 08:28 AM   #2
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,859
Default

i have not seen a tool like this yet.
if i had to write a tool like this i would look at the pyparsing library in python
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Old 04-24-2008, 02:16 PM   #3
ptmcg
Registered User
 
Join Date: Apr 2008
Posts: 1
Default

Here is a static analysis tool (using pyparsing) (http://code.google.com/p/asdox/):

The parser skims the source files only looking for things of interest such as class/interface definitions, import statements, JavaDoc tags and member declarations. The parser ignores things such as actual method implementations to avoid overhead.

Maybe it could give you a start on writing such a tool.

Pyparsing has been used for code analysis and code conversion in other cases, see these examples of pyparsing usage at http://pyparsing.wikispaces.com/WhosUsingPyparsing.
ptmcg is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
3D game using flash cs3 and actionscript 3 manoskouf ActionScript 3.0 19 04-10-2008 05:41 PM
log analysis tool jakepeg ActionScript 3.0 3 08-15-2007 09:18 PM
Are Static Classes not always so static? bennage ActionScript 2.0 6 04-10-2007 05:02 PM
Database simulated with arrays on a cd-rom lecasn5 Components 61 09-07-2004 12:40 PM
code not working jaredly ActionScript 1.0 (and below) 6 06-05-2002 08:56 PM


All times are GMT. The time now is 01:19 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.