问题
Is there an equivalent of JSLint for ColdFusion?
回答1:
I've not encountered anything particularly lint-like for CF, but there are assorted syntax checkers:
- CodeCop (riaforge)
- VarScoper (riaforge)
- QueryParam Scanner (riaforge)
回答2:
There are no online validators that I am aware of for ColdFusion. You can download the free open source Eclipse (1.4) and install the free CFEclipse Plug-In for ColdFusion which includes a dictionary reference for ColdFusion as well as a syntax error checker. Very handy for checking for errors as you write your CFML.
You can download Eclipse at www.eclipse.org and the CFEclipse plug-in at cfeclipse.org.
回答3:
Although woefully inadequate for what you want, the Code Compatibility Analyzer that comes with Coldfusion can do some basic checking.
It is primailary focused on upgrading from earlier versions so you won't get a lot of a WHOLE lot out of it.
It will not perform any scoping checks, which I believe Coldfusion Really needs.
回答4:
Not exactly what you're looking for, but IntelliJ IDEA has a CFML plugin, and it highlights various kinds of (things it thinks are) errors. In my experience, it shows some false positives, mostly references it can't resolve, but it also does flag many real errors; often saves some test-fail-fix cycles. (It's also an awesome IDE in general IMO.)
回答5:
The ColdFusion builder product that Adobe put out has pretty good error trapping. Standard red x on the line number where you have an error with a brief description as to why your code is currently broken.
来源:https://stackoverflow.com/questions/967426/lint-for-coldfusion