-
Notifications
You must be signed in to change notification settings - Fork 203
JSHint, JSlint, HTML Validation and CSSLint
Optionally, you can have the build script run your JavaScript files through JSHint or JSLint to help detect errors or potential problems. This is not necessary for any of the other build options, and build failure when running these targets only means that errors were found during the quality check. To run, simply specify one of the following:
ant build jshint
ant build jslint
JSHint and JSLint can both be configured with a variety of options. The defaults can be found in the default.properties
file, and you can override them in project.properties
. See http://jshint.com/ and http://www.jslint.com/lint.html for more information.
Note that these targets are set to exclude any JavaScript files ending in ".min.js", as well as files located within the js/libs directory.
You can check if your CSS files have any issues by running your files through CSSLint and detecting potential problems (note that CSSLint parser is not perfect and has bugs). Build failure when running these targets only means that errors were found during the quality check of your stylesheet. To run, use:
ant build csslint
You can check if your HTML files have issues. From the build folder, simply run
ant validate