Merge pull request #329 from halton/cpplint
[platform/framework/web/tizen-extensions-crosswalk.git] / tools / js_lint.sh
1 #!/bin/bash
2 # Copyright (c) 2013 Intel Corporation. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 if [ ! `which gjslint` ]; then
7    echo -e "\nPlease make sure gjslint (Google Closure Lint) is in your PATH."
8    echo -e "You can install it directly by \"sudo easy_install-2.7 http://closure-linter.googlecode.com/files/closure_linter-latest.tar.gz\"."
9    echo -e "Or visit https://developers.google.com/closure/utilities/docs/linter_howto for more information.\n"
10    exit 1
11 fi
12
13 if [ $# -eq 0 ]; then
14    echo -e "\nUsage: $0 path_to_js_files_to_check\n"
15    exit 1
16 fi
17
18 gjslint --strict --nojsdoc --max_line_length 100 --unix_mode $1