Is there an equivalent of JSLint for ColdFusion?
-
2There is a GitHub project called CFLint https://github.com/cflint/CFLint with multi-platform releases here https://github.com/cflint/CFLint/releases – mhatch Apr 06 '17 at 19:53
5 Answers
I've not encountered anything particularly lint-like for CF, but there are assorted syntax checkers:

- 110,170
- 32
- 120
- 176
-
No idea why this was the accepted answer. The answer is no, there isn't one. Wish there was. – Steve Ross Nov 13 '12 at 18:40
-
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.

- 4,587
- 4
- 26
- 37
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.

- 15,820
- 14
- 59
- 86
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.)

- 3,316
- 7
- 30
- 35
-
When I first read this post I was giddy with glee. Maybe, just maybe, a decent IDE. But, alas, glee was fleeting. It sucked just like the others. I still have hope that IntelliJ will come through on some of my questions. I will definitely let you know. – user990016 Feb 28 '12 at 01:56
-
To each their own, but I use IDEA for CFML all day every day and I love it. It's got warts for sure, but IMO it's head and shoulders above everything else in terms of features that improve productivity and code quality. If you have specific questions or problems, check the google group (https://groups.google.com/forum/?#!forum/cfml-plugin-for-intellij-idea). – enigment Feb 28 '12 at 14:44
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.

- 226
- 2
- 5
-
It appears that JSLint is to make sure code has higher quality. That is different from whether it throws errors. Consider `SELECT * FROM myTable where ID = #url.id#` It may be correct and not throw an error, but it's dangerously flawed – James A Mohler Dec 03 '12 at 20:09