aboutsummaryrefslogtreecommitdiff
path: root/hooks/pre-commit
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/pre-commit')
-rwxr-xr-xhooks/pre-commit16
1 files changed, 10 insertions, 6 deletions
diff --git a/hooks/pre-commit b/hooks/pre-commit
index b10073ca..904d38dc 100755
--- a/hooks/pre-commit
+++ b/hooks/pre-commit
@@ -7,6 +7,16 @@ export GOGC=400
export GOPATH="$(pwd):$(pwd)/vendor"
export PATH="$PATH:$(pwd)/vendor/bin:$(pwd)/bin"
+echo "Checking that it builds"
+gb build
+
+# Check that all the packages can build.
+# When `go build` is given multiple packages it won't output anything, and just
+# checks that everything builds. This seems to do a better job of handling
+# missing imports than `gb build` does.
+echo "Double checking it builds..."
+go build github.com/matrix-org/dendrite/cmd/...
+
echo "Installing lint search engine..."
go install github.com/alecthomas/gometalinter/
gometalinter --config=linter.json ./... --install
@@ -20,11 +30,5 @@ misspell -error src *.md
echo "Testing..."
gb test
-# Check that all the packages can build.
-# When `go build` is given multiple packages it won't output anything, and just
-# checks that everything builds. This seems to do a better job of handling
-# missing imports than `gb build` does.
-echo "Double checking it builds..."
-go build github.com/matrix-org/dendrite/cmd/...
echo "Done!"