Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ignore .min.js when linting

  • Loading branch information...
commit d8f184e3b74869f627a8c1709ac5ce833d7139d6 1 parent 9d825d4
@langpavel authored
Showing with 4 additions and 4 deletions.
  1. +1 −1  fixjsstyle
  2. +1 −1  jslint
  3. +2 −2 tools/git-hooks/pre-commit
View
2  fixjsstyle
@@ -2,7 +2,7 @@
BASEPATH=`dirname "$0"`
FILES=$*
if [ "$FILES" = "" ]; then
- FILES=`find -iregex .*\\.js$ | grep -v node_modules`
+ FILES=`find -iregex .*\\.js$ | grep -v node_modules | grep -v .min.js`
fi
PYTHONPATH=$BASEPATH/tools/closure_linter/ `which python` $BASEPATH/tools/closure_linter/closure_linter/fixjsstyle.py --strict --nojsdoc $FILES
View
2  jslint
@@ -2,7 +2,7 @@
BASEPATH=`dirname "$0"`
FILES=$*
if [ "$FILES" = "" ]; then
- FILES=`find -iregex .*\\.js$ | grep -v node_modules`
+ FILES=`find -iregex .*\\.js$ | grep -v node_modules | grep -v .min.js`
fi
PYTHONPATH=$BASEPATH/tools/closure_linter/ `which python` $BASEPATH/tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc $FILES
View
4 tools/git-hooks/pre-commit
@@ -43,9 +43,9 @@ then
exit 1
fi
-LINTFILES=$(git diff --cached --name-only --diff-filter=ACMR $against | grep -e \\.js$)
+LINTFILES=$(git diff --cached --name-only --diff-filter=ACMR $against | grep -e \\.js$ | grep -v .min.js)
if [ "$LINTFILES" != "" ]; then
- ./jslint $(git diff --cached --name-only --diff-filter=ACMR $against | grep -e \\.js$)
+ ./jslint $LINTFILES
exit $?
fi
Please sign in to comment.
Something went wrong with that request. Please try again.