Those that use the sensational varscoper tool from Mike Schierberl know that cfscript is still a little experimental with the current release.
One of the things it can do is return variables that are actually “var” scoped as not var scoped when using cfscript. This seems to happen most often when you have a comment directly above the variable in question.
In the above example Varscoper tells me that “newRow” is not var scoped when clearly it is.
This is usually fine, but if you start to get a lot of these false positives there is a quick little workaround. Place a semi-colon at the end of the last comment which effectively tells varscoper where the statement finishes and fixes the problem.
Note the semi-colon after the 2nd comment. Now my reports are nice and clean ![]()
Nice one. Thanks.
Indy Nagpal
April 8th, 2008
Do you mind posting an issue at RIAforge? I have a few other open ones there. Someday I’ll get around to them all, and I want to make sure I don’t miss this.
-Mike
Mike Schierberl
April 9th, 2008
OK, today is the day, the issue should be fixed in 1.20, I’ve posted the new version up on RIAForge.
Mike Schierberl
May 21st, 2008
@Mike - thanks for that, I’ll check it out. Thanks again for a fantastic tool!
Michael Sharman
May 21st, 2008