aboutsummaryrefslogtreecommitdiff
path: root/golint.bash
blob: 5040c127bc5f3a26914a7b2b2940458c51231058 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash -u

OUTPUT=$(
	golint ./... | \
	 grep -v "don't use an underscore in package name" | \
	 grep -v "don't use ALL_CAPS in Go names; use CamelCase" |
	 grep -v "struct field allow_other should be allowOther" |
	 grep -v "struct field serialize_reads should be serializeReads"
)

# No output --> all good
if [[ -z "$OUTPUT" ]] ; then
	exit 0
fi

echo "golint.bash:"
echo $OUTPUT
exit 1