Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Commit

Permalink
Merge pull request weaveworks#39 from weaveworks/fix-wrong-subtree-use
Browse files Browse the repository at this point in the history
Sync changes done directly in scope/tools
  • Loading branch information
Alfonso Acosta authored Aug 26, 2016
2 parents 45dcdd5 + 3f4934d commit 4fe078a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lint
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 9 additions & 2 deletions test
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4fe078a

Please sign in to comment.