forked from gluster/glusterd2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a lint script to golint correctly and use it
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#/bin/bash | ||
|
||
# NOTE: This script needs be run from the root of the GD2 repository | ||
|
||
# Find all Go source files in the repository, that are not vendored or generated | ||
# and then run golint on them | ||
|
||
RETVAL=0 | ||
|
||
for file in $(find . -path ./vendor -prune -o -type f -name '*.go' -not -name '*.pb.go' -print); do | ||
golint -set_exit_status $file | ||
if [ $? -eq 1 -a $RETVAL -eq 0 ]; then | ||
RETVAL=1 | ||
fi | ||
done | ||
exit $RETVAL |