Skip to content
This repository has been archived by the owner on May 19, 2019. It is now read-only.

Commit

Permalink
Ignore .min.js when linting
Browse files Browse the repository at this point in the history
  • Loading branch information
langpavel committed Oct 10, 2012
1 parent 9d825d4 commit d8f184e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fixjsstyle
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
BASEPATH=`dirname "$0"` BASEPATH=`dirname "$0"`
FILES=$* FILES=$*
if [ "$FILES" = "" ]; then if [ "$FILES" = "" ]; then
FILES=`find -iregex .*\\.js$ | grep -v node_modules` FILES=`find -iregex .*\\.js$ | grep -v node_modules | grep -v .min.js`
fi fi


PYTHONPATH=$BASEPATH/tools/closure_linter/ `which python` $BASEPATH/tools/closure_linter/closure_linter/fixjsstyle.py --strict --nojsdoc $FILES PYTHONPATH=$BASEPATH/tools/closure_linter/ `which python` $BASEPATH/tools/closure_linter/closure_linter/fixjsstyle.py --strict --nojsdoc $FILES
Expand Down
2 changes: 1 addition & 1 deletion jslint
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
BASEPATH=`dirname "$0"` BASEPATH=`dirname "$0"`
FILES=$* FILES=$*
if [ "$FILES" = "" ]; then if [ "$FILES" = "" ]; then
FILES=`find -iregex .*\\.js$ | grep -v node_modules` FILES=`find -iregex .*\\.js$ | grep -v node_modules | grep -v .min.js`
fi fi


PYTHONPATH=$BASEPATH/tools/closure_linter/ `which python` $BASEPATH/tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc $FILES PYTHONPATH=$BASEPATH/tools/closure_linter/ `which python` $BASEPATH/tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc $FILES
Expand Down
4 changes: 2 additions & 2 deletions tools/git-hooks/pre-commit
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ then
exit 1 exit 1
fi 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 if [ "$LINTFILES" != "" ]; then
./jslint $(git diff --cached --name-only --diff-filter=ACMR $against | grep -e \\.js$) ./jslint $LINTFILES
exit $? exit $?
fi fi


0 comments on commit d8f184e

Please sign in to comment.