i liked it so much i wrote an ant task
        <property name="lib.dir" value="${basedir}/../../../../../../lib"/>
        
        <property name="rhino.interpreter.jar" value="js.jar"/>
        <property name="rhino.interpreter.jar.path"
value="${lib.dir}/${rhino.interpreter.jar}"/>
        <property name="rhino.interpreter.class"
value="org.mozilla.javascript.tools.shell.Main"/>
        
        <property name="jslint.file" value="jslint.js"/>
        <property name="jslint.file.path" value="${lib.dir}/${jslint.file}"/>

        
        <!-- syntax checking on js -->
        <macrodef name="runjslint">
                <attribute name="jsfile" default="NO JS FILE SET"/>
                <sequential>                    
                        <java classpath="${rhino.interpreter.jar.path}"
                                classname="${rhino.interpreter.class}"
                                failonerror="true">
                                        <arg value="${jslint.file.path}" />
                                        <arg value="@{jsfile}" />       
                        </java>
                </sequential>
        </macrodef>
        
        
        <target name="log4moz.test" depends="log4moz.build">
                <runjslint jsfile="log4moz.js"/>
        </target>

On 3/10/06, Adam Judson <[EMAIL PROTECTED]> wrote:
> Just discovered http://www.javascriptlint.com/.
>
> As someone who had my extensions do nothing because of missed quotes.
> brackets and commas on every third change, this has probably saved me
> about an hour of looking at source code today alone.
>
> For those using a .bat file to assemble in windows:
>
>  I added this:
>
> \dev\jslint\jsl conf \dev\jslint\jsl.default.conf +recurse -process
> *.js> c:\tmp\jswarnings.txt
> if %ERRORLEVEL% GTR 0 (
>    call epm c:\tmp\jswarnings.txt
>    echo there were warnings
> )
>
> if %ERRORLEVEL% GTR 1 (
>    echo Errors - aborting
>    cd ..
>    goto :EOF
> )
> before I build the jar.  (epm is an editor, and \dev\jslint\jsl is the
> location/exe).
>
>
> Adam
> photomap.mozdev.org
> _______________________________________________
> Project_owners mailing list
> [email protected]
> http://mozdev.org/mailman/listinfo/project_owners
>
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to