mirror of
https://github.com/weaveworks/scope.git
synced 2026-02-15 10:29:51 +00:00
Merge pull request #39 from weaveworks/fix-wrong-subtree-use
Sync changes done directly in scope/tools
This commit is contained in:
4
lint
4
lint
@@ -40,11 +40,11 @@ function spell_check {
|
||||
filename="$1"
|
||||
local lint_result=0
|
||||
|
||||
# we don't want to spell check tar balls or binaries
|
||||
# we don't want to spell check tar balls, binaries, Makefile and json files
|
||||
if file "$filename" | grep executable >/dev/null 2>&1; then
|
||||
return $lint_result
|
||||
fi
|
||||
if [[ $filename == *".tar" || $filename == *".gz" ]]; then
|
||||
if [[ $filename == *".tar" || $filename == *".gz" || $filename == *".json" || $(basename "$filename") == "Makefile" ]]; then
|
||||
return $lint_result
|
||||
fi
|
||||
|
||||
|
||||
11
test
11
test
@@ -47,8 +47,15 @@ fi
|
||||
|
||||
fail=0
|
||||
|
||||
# NB: Relies on paths being prefixed with './'.
|
||||
TESTDIRS=( $(git ls-files -- '*_test.go' | grep -vE '^(vendor|prog|experimental)/' | xargs -n1 dirname | sort -u | sed -e 's|^|./|') )
|
||||
if [ -z "$TESTDIRS" ]; then
|
||||
# NB: Relies on paths being prefixed with './'.
|
||||
TESTDIRS=( $(git ls-files -- '*_test.go' | grep -vE '^(vendor|prog|experimental)/' | xargs -n1 dirname | sort -u | sed -e 's|^|./|') )
|
||||
else
|
||||
# TESTDIRS on the right side is not really an array variable, it
|
||||
# is just a string with spaces, but it is written like that to
|
||||
# shut up the shellcheck tool.
|
||||
TESTDIRS=( $(for d in ${TESTDIRS[*]}; do echo "$d"; done) )
|
||||
fi
|
||||
|
||||
# If running on circle, use the scheduler to work out what tests to run on what shard
|
||||
if [ -n "$CIRCLECI" ] && [ -z "$NO_SCHEDULER" ] && [ -x "$DIR/sched" ]; then
|
||||
|
||||
Reference in New Issue
Block a user