Properly exclude vendor from lint

This commit is contained in:
Jonathan Lange
2016-07-15 11:19:09 +01:00
parent ca6ebfba10
commit c045d165bc
2 changed files with 2 additions and 2 deletions

View File

@@ -10,4 +10,4 @@
mime_type=$1 mime_type=$1
shift shift
git ls-files | grep -vE '^vendor/' | xargs file --mime-type | grep "${mime_type}" | sed -e 's/:.*$//' git ls-files "$@" | grep -vE '^vendor/' | xargs file --mime-type | grep "${mime_type}" | sed -e 's/:.*$//'

2
lint
View File

@@ -166,7 +166,7 @@ function lint_files {
function list_files { function list_files {
if [ $# -gt 0 ]; then if [ $# -gt 0 ]; then
git ls-files --exclude-standard | grep -v '^vendor/' git ls-files --exclude-standard | grep -vE '(^|/)vendor/'
else else
git diff --cached --name-only git diff --cached --name-only
fi fi