Upcoming update to the Var Scope Checker
While helping a user on IRC, (dalnet #ColdFusion) I was looking for the Var Scope Checker. In my hunt to find the darned thing, I saw in the comments of Matt Woodward's blog that Seth Petry-Johnson is planning on updating the Var Scope Checker.
If you aren't familiar with the var scope checker, it is a tool that scours your source code looking for unscoped variables. It is a reasonably intelligent tool in the current incarnation.
My only gripe with the tool is it isn't savvy in cfscript blocks. This is apparently set to change this weekend. Keep an eye on Seth's blog for the update.
If you are reading this and are a ColdFusion programmer and have no idea why you need this tool, please have a read at the following:
Seth, if you read this, please consider placing the tool on RIA forge. As it is now, I have to find your site, which throws an error, then walk down to the base directory.
Update: Mike Schierberl has another var scope checking tool found here. According to Mike, "I also developed a test case file that is useful for identifying cases that the tool should find. After installing varScopeChecker, I ran my testCaseCFC and it only found 16 of 24 unscoped variables.".
The test case is available here.
Please have a look at Mike's Var Scope tool.







Ohhh A file browser would be nice. Would you still be willing to make that code available?
DW
Thanks for the information. I was not aware of the stubbie project. I am downloading it now.
Glad to have met you at CF.Objective(). I hope you got back safe and sound.
DW
checked already some projects with really bad results, bad bad boy!
but one thing i wanted to ask, does it work with <cfscript>?
i decleare a lot of my variables inside
<cfscript>
var i = 0
</cfscript>
and i still get a warning on this variable.
Is it something you thought to do? I m sorry i don t have time this days but if I get some time on the next weeks I could check if this could be done.
thanks a lot
-daniel.
sorry... it s so tipical ... complain before reading the instructions...
nice done! thanks a lot
-daniel.
http://schierberl.com/varscoper
I also developed a test case file that is useful for identifying cases that the tool should find. After installing varScopeChecker, I ran my testCaseCFC and it only found 16 of 24 unscoped variables. You can see the test case file here:
http://schierberl.com/varscoper/examples/fileDisplay.cfm?skipLineNumbers=true&fileName=%5CtestCaseCFC%2Ecfc
I ran across your version once but could no longer find it via google search. That is what I get for using "Var Scope Checker" as a keyword. Thanks for leaving the comment. I will update the post to show your tool.
DW