-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathgo-pre-commit
More file actions
executable file
·28 lines (21 loc) · 946 Bytes
/
go-pre-commit
File metadata and controls
executable file
·28 lines (21 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
# Intended for use with m-lab/git-hooks.
# Clone or use submodule, and link .git/hooks to git-hooks,
# e.g.
# mv .git/hooks .git/hooks.orig
# ln -s ../../git-hooks .git/hooks
#
set -x
set -u
# travis lint -x # Already done by git-hooks/pre-commit
# TODO There are still a LOT of lint warnings, so skip this for now.
# golint ./...
golint ./storage/... ./task/...
# Shadow declarations cause a lot of bugs. Currently clean.
go tool vet --shadow .
# These are now clean for vet
go vet ./annotation/... ./appengine/... ./fake/... ./metrics/... ./schema/... ./task/... ./web100/...
# These are currently partially clean
go vet -assign -atomic -bool -buildtags -cgocall -copylocks -httpresponse -methods -nilfunc -printf -rangeloops -shift -structtags -tests -unreachable -unsafeptr -unusedresult ./bq/... ./etl/... ./parser/... ./storage/...
# These still have failures in some package
# go vet -composites -lostcancel ./...