From c045d165bc09d67a98e50d7e06223cd29aa35e76 Mon Sep 17 00:00:00 2001 From: Jonathan Lange Date: Fri, 15 Jul 2016 11:19:09 +0100 Subject: [PATCH 1/2] Properly exclude vendor from lint --- files-with-type | 2 +- lint | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files-with-type b/files-with-type index 0c7dcbb09..771380ada 100755 --- a/files-with-type +++ b/files-with-type @@ -10,4 +10,4 @@ mime_type=$1 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/:.*$//' diff --git a/lint b/lint index eeca6653f..994d4c321 100755 --- a/lint +++ b/lint @@ -166,7 +166,7 @@ function lint_files { function list_files { if [ $# -gt 0 ]; then - git ls-files --exclude-standard | grep -v '^vendor/' + git ls-files --exclude-standard | grep -vE '(^|/)vendor/' else git diff --cached --name-only fi From df494d6a2dc19891370200358da47843fb4ed555 Mon Sep 17 00:00:00 2001 From: Jonathan Lange Date: Fri, 15 Jul 2016 11:31:58 +0100 Subject: [PATCH 2/2] Remove dependencies --- files-with-type | 2 -- 1 file changed, 2 deletions(-) diff --git a/files-with-type b/files-with-type index 771380ada..8238980c6 100755 --- a/files-with-type +++ b/files-with-type @@ -4,8 +4,6 @@ # # e.g. # $ files-with-type text/x-shellscript k8s infra -# -# Assumes `find`, `xargs`, and `file` are all installed. mime_type=$1 shift