From c50d272959e8fc1cfb2d7125e63fd0ab6728d953 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Fri, 8 Sep 2017 13:33:18 +0100 Subject: [PATCH] Enable GC for the pre-commit hook, and tune it for throughput --- hooks/pre-commit | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hooks/pre-commit b/hooks/pre-commit index 8d71b1c6a..b10073ca5 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -2,6 +2,8 @@ set -eu +# Tune the GC to use more memory to reduce the number of garbage collections +export GOGC=400 export GOPATH="$(pwd):$(pwd)/vendor" export PATH="$PATH:$(pwd)/vendor/bin:$(pwd)/bin" @@ -10,7 +12,7 @@ go install github.com/alecthomas/gometalinter/ gometalinter --config=linter.json ./... --install echo "Looking for lint..." -gometalinter --config=linter.json ./... +gometalinter --config=linter.json ./... --enable-gc echo "Double checking spelling..." misspell -error src *.md