Skip to content
Mitsuru Mutaguchi edited this page Oct 19, 2018 · 8 revisions

Closure Linterの使い方

https://developers.google.com/closure/utilities/docs/linter_howto

gjslintインストール(CentOS7)

# yum install epel-release
# yum install python-pip python-six
# pip install https://github.com/google/closure-linter/zipball/master

チェックコマンド

$ gjslint -r /var/www/html/nc3/app/Plugin/Wysiwyg --strict --max_line_length 100 -x jquery.js,jquery.cookie.js,js_debug_toolbar.js,travis.karma.conf.js,my.karma.conf.js -e jasmine_examples,HTMLPurifier/Printer,webroot/js/langs

TravisCIテストで実行しているコマンドを参考にしました。

チェック指摘内容の自動修正コマンド

$ fixjsstyle -r /var/www/html/nc3/app/Plugin/Wysiwyg --strict --max_line_length 100 -x jquery.js,jquery.cookie.js,js_debug_toolbar.js,travis.karma.conf.js,my.karma.conf.js -e jasmine_examples,HTMLPurifier/Printer,webroot/js/langs

参考

Clone this wiki locally