Skip to content

Commit

Permalink
[FAB-8975] Exclude testdata from linting/license
Browse files Browse the repository at this point in the history
Change-Id: I9170a5a94ec5dab871363d65cb5e0020f38645cc
Signed-off-by: Matthew Sykes <[email protected]>
  • Loading branch information
sykesm committed Mar 20, 2018
1 parent 621725f commit 2235b26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/check_license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
function filterExcludedFiles {
CHECK=`echo "$CHECK" | grep -v .png$ | grep -v .rst$ | grep -v ^.git/ \
| grep -v .pem$ | grep -v .block$ | grep -v .tx$ | grep -v ^LICENSE$ | grep -v _sk$ \
| grep -v .key$ | grep -v \\.gen.go$ | grep -v ^Gopkg.lock$ \
| grep -v .key$ | grep -v \\.gen.go$ | grep -v ^Gopkg.lock$ | grep -v 'testdata/' \
| grep -v .md$ | grep -v ^vendor/ | grep -v ^build/ | grep -v .pb.go$ | sort -u`
}

Expand Down
4 changes: 2 additions & 2 deletions scripts/golinter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ do
echo ">>>Checking code under $i/"

echo "Checking with gofmt"
OUTPUT="$(gofmt -l -s ./$i)"
OUTPUT="$(gofmt -l -s ./$i | grep -v testdata/ || true)"
if [[ $OUTPUT ]]; then
echo "The following files contain gofmt errors"
echo "$OUTPUT"
Expand All @@ -36,7 +36,7 @@ do
fi

echo "Checking with goimports"
OUTPUT="$(goimports -srcdir $GOPATH/src/github.com/hyperledger/fabric -l $i)"
OUTPUT="$(goimports -srcdir $GOPATH/src/github.com/hyperledger/fabric -l $i | grep -v testdata/ || true )"
if [[ $OUTPUT ]]; then
echo "The following files contain goimports errors"
echo $OUTPUT
Expand Down

0 comments on commit 2235b26

Please sign in to comment.