开发者

Varscoper for CFScript based components [closed]

开发者 https://www.devze.com 2023-04-10 03:36 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 10 years ago.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号