Peter is correct. The desire is a quick and dirty syntax check, non-
runtime. I am trying to make a small step for shops that have legacy,
spaghetti code toward automated testing and ci. A jar would be perfect
like with ACF, we can do this:
<java classname="coldfusion.tools.CommandLineInvoker" fork="true"
resultproperty="java.compilecheck" output="$
{coldfusion.compiler.syntaxresults}">
<classpath>
<pathelement location="${jrun.jar}" />
<pathelement
location="${coldfusion.bootstrap.jar}" />
<pathelement location="${coldfusion.cfx.jar}" />
</classpath>
<sysproperty key=" coldfusion.classPath" value="$
{coldfusion.compiler.classpath}" />
<sysproperty key=" coldfusion.libPath" value="$
{coldfusion.compiler.libpath}" />
<arg line=" Compiler " />
<arg line=" -webroot ${webroot} " />
<arg line=" ${filePathToBuildFolder}" />
</java>
FYI - It seems Railo has a Build.cfc.
This might a an easy first step for people looking to have existing
code work in OpenBD also.
On Jan 2, 5:43 pm, "Peter J. Farrell" <[email protected]> wrote:
> @Alan,
>
> Is there a jar or hook that we can use to pass in the path or source to
> a file and check if the syntax is correct? I think the desired end
> result is to figure out if a .cfm/.cfc doesn't have any syntax errors
> (except for runtime ones which this wouldn't check for).
>
> .pjf
>
> Alan Williamson (aw2.0 cloud experts) said the following on 01/02/2012
> 05:39 PM:
>
> > Peter is right .. we do not compile the CFML down to bytecode ...
> > there are lots of advantages to this method, namely keeping memory
> > overhead down. So i suspect, (and I haven't look at it yet, as i am
> > on the road at the moment) this tool won't work if it is inspecting
> > bytecode.
>
> > Peter Farrell wrote:
>
> >> OpenBD doesn't compile source to bytecode. I believe it uses a stack
> >> behind the scenes.
>
> >> Alan is going to have to chime in here if it is possible to run a
> >> syntax check on a .cfc / .cfm file without running it.
>
> --
> Peter J. Farrell
> [email protected]
> [email protected]http://blog.maestropublishing.com
> Identi.ca / Twitter: @maestrofjp
--
online documentation: http://openbd.org/manual/
google+ hints/tips: https://plus.google.com/115990347459711259462
http://groups.google.com/group/openbd?hl=en
Join us @ http://www.OpenCFsummit.org/ Dallas, Feb 2012