File: lint

package info (click to toggle)
golang-github-opencontainers-image-spec 1.0.0~rc2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 532 kB
  • ctags: 185
  • sloc: makefile: 126
file content (24 lines) | stat: -rwxr-xr-x 681 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o pipefail

if [ ! $(command -v gometalinter) ]; then
	go get -u github.com/alecthomas/gometalinter
	gometalinter --update --install
fi

for d in $(find . -type d -not -iwholename '*.git*' -a -not -iname '.tool' -a -not -iwholename '*vendor*'); do
	gometalinter \
		--exclude='error return value not checked.*(Close|Log|Print).*\(errcheck\)$' \
		--exclude='.*_test\.go:.*error return value not checked.*\(errcheck\)$' \
		--exclude='duplicate of.*_test.go.*\(dupl\)$' \
		--exclude='schema/fs.go' \
		--disable=aligncheck \
		--disable=gotype \
		--disable=gas \
		--cyclo-over=35 \
		--tests \
		--deadline=10s "${d}"
done