-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'valencia' into uniform-fallbacks-json
- Loading branch information
Showing
1,416 changed files
with
272,932 additions
and
418 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
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,63 @@ | ||
#!/bin/sh | ||
|
||
# Git pre-push hook for the Lantern project | ||
# Maintainer: Ulysses Aalto <[email protected]> | ||
# | ||
# Installation: Copy into .git/hooks/pre-push | ||
|
||
|
||
# Exit immediately if a command exits with a non-zero status. | ||
set -e | ||
|
||
# Find only modified files/directories | ||
MODIFIED_DIRS=$(git status --porcelain | \ | ||
awk 'match($1, "M") && match($2, "src/github.com/getlantern/*"){print $2}' | \ | ||
sed 's+src/github.com/getlantern/++g' | \ | ||
sed 's+/.*++' | \ | ||
uniq) | ||
echo "Running hook -- Analyzing modified packages..." | ||
for i in $MODIFIED_DIRS; do | ||
echo " * $i"; | ||
done | ||
echo | ||
|
||
cd src/github.com/getlantern | ||
|
||
which errcheck >/dev/null || (echo "Unable to find errcheck, please install it: \`go get github.com/kisielk/errcheck\`" && exit 1) | ||
which golint >/dev/null || (echo "Unable to find golint, please install it: \`go get -u github.com/golang/lint/golint\`" && exit 1) | ||
|
||
echo "*** Running \033[0;34mErrcheck\033[0m ***" && \ | ||
for dir in $MODIFIED_DIRS; do | ||
errcheck github.com/getlantern/$dir || (\ | ||
echo "\033[0;31merrcheck returned error analyzing the package '$dir'\033[0m" && \ | ||
echo "Please, fix and run again\n" && \ | ||
exit 1) | ||
done | ||
echo "\033[1;34mErrcheck\033[0m ran successfully\n" | ||
|
||
echo "*** Running \033[0;34mGo vet\033[0m ***" && \ | ||
for dir in $MODIFIED_DIRS; do | ||
go vet github.com/getlantern/$dir || (\ | ||
echo "\033[0;31mgo vet returned error analyzing the package '$dir'\033[0m" | ||
echo "Please, fix and run again\n" && \ | ||
exit 1) | ||
done | ||
echo "\033[1;34mGo vet\033[0m ran successfully\n" | ||
|
||
echo "*** Running \033[0;34mGolint\033[0m ***" && \ | ||
for dir in $MODIFIED_DIRS; do | ||
golint github.com/getlantern/$dir || (\ | ||
echo "\033[0;31mgo vet returned error analyzing the package '$dir'\033[0m" | ||
echo "Please, fix and run again\n" && \ | ||
exit 1) | ||
done | ||
echo "\033[1;34mGolint\033[0m ran successfully\n" | ||
|
||
echo "*** Running \033[0;34mGo test -race\033[0m ***" && \ | ||
for dir in $MODIFIED_DIRS; do | ||
go test -race github.com/getlantern/$dir || (\ | ||
echo "\033[0;31mgo vet returned error analyzing the package '$dir'\033[0m" | ||
echo "Please, fix and run again\n" && \ | ||
exit 1) | ||
done | ||
echo "\033[1;34mGo test -race\033[0m ran successfully\n" |
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
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
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
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
Oops, something went wrong.