Project owner: | Shane O'Sullivan |
---|---|
since: | V1.4 |
Contents
Checkstyle is a command line tool that generates a report of all JavaScript files that violate :ref:`the Dojo code style guidelines <developer/styleguide>`. It also includes an interactive online tool to automatically fix most style guide issues.
Open a command window in the util/checkstyle folder. The commands listed below all use '''checkstyle.bat''', which is for MS Windows, but users of Linux and Macs can use '''checkstyle.sh'''.
checkstyle.bat
checkstyle.bat dir=dijit/form
checkstyle.bat dir=myCustomNs
checkstyle help
The Checkstyle Online Tool can be used to look at the style guide violations and to fix them. Open the file util/checkstyle/checkstyleReport.html, which will display the errors to be fixed. Note that this file should be opened using a web server, and not from the file system, as browser security issues will cause problems if loaded from the file system.