mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-04 10:41:14 +00:00
Merge pull request #26 from weaveworks/this-time-for-sure
Properly exclude vendor from lint
This commit is contained in:
@@ -4,10 +4,8 @@
|
|||||||
#
|
#
|
||||||
# e.g.
|
# e.g.
|
||||||
# $ files-with-type text/x-shellscript k8s infra
|
# $ files-with-type text/x-shellscript k8s infra
|
||||||
#
|
|
||||||
# Assumes `find`, `xargs`, and `file` are all installed.
|
|
||||||
|
|
||||||
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
2
lint
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user