Varscoper for CFScript based components [closed]
As we all know, varScoping your ColdFusion code is an absolute must for any non-trivial project.
CF9 brings many enhancements to CFScript, such as being abl开发者_C百科e to write entire CFC's in script, including component, function and property tags.
However varScoper won't work with cfScript defined functions/components. It just doesn't attempt to check functions declared in script.
The question is, what is everyone using for varscoping their cfScript based CFC's?
dave
VarScope is under an Apache licence, so is "open source". You could always touch base with the bloke in charge of it and see if he'd be interested in third-party updates to it, and perhaps you could make the changes yourself? It would certainly earn you community brownie points!
Not an entirely satisafactory answer, I know.
To answer your actual question: until CF has full CFScript coverage for the functionality we use (or are likely to want to use) in CFCs we won't implement any script-only CFCs. And for our tag-based ones we just use a tight coding standard and have code peer review before committing anything for release. Occasionally we run varscoper, but it does a less good job of finding problems than two sets of eyes do: varscoper does seem to come up with a lot of false positives.
Another consideration is that if you have 100% unit test coverage (yes, I know: who does?) then checking what's in the variables scope of a CFC after you've run your tests will show up any leaks into the variables scope.
精彩评论