summaryrefslogtreecommitdiff
path: root/.tool
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2017-11-01 16:24:45 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2017-11-02 15:30:10 -0400
commit10006e787ee246db0d03065c523ac2477208e7f8 (patch)
treee550f111d8684bf68975330a2ee4ea8a8ad2d019 /.tool
parentf0f5b51ff27d8eec790f2d5fc12c28c536149bb7 (diff)
downloadpodman-10006e787ee246db0d03065c523ac2477208e7f8.tar.gz
podman-10006e787ee246db0d03065c523ac2477208e7f8.tar.bz2
podman-10006e787ee246db0d03065c523ac2477208e7f8.zip
No man5 or man8 man pages
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to '.tool')
-rwxr-xr-x.tool/lint44
1 files changed, 44 insertions, 0 deletions
diff --git a/.tool/lint b/.tool/lint
new file mode 100755
index 000000000..a62044255
--- /dev/null
+++ b/.tool/lint
@@ -0,0 +1,44 @@
+#!/usr/bin/env bash
+
+set -o errexit
+set -o nounset
+set -o pipefail
+
+# Create the linter path for use later
+LINTER=${GOPATH}/bin/gometalinter
+
+# Make sure gometalinter is installed
+if [ ! -f ${LINTER} ]; then
+ echo >&2 "gometalinter must be installed. Please run 'make install.tools' and try again"
+ exit 1
+fi
+
+PKGS=$(find . -type d -not -path . -a -not -iwholename '*.git*' -a -not -iname '.tool' -a -not -iwholename '*vendor*' -a -not -iname 'hack' -a -not -iwholename '*.artifacts*' -a -not -iwholename '*contrib*' -a -not -iwholename '*test*' -a -not -iwholename '*logo*' -a -not -iwholename '*conmon*' -a -not -iwholename '*completions*' -a -not -iwholename '*docs*' -a -not -iwholename '*pause*')
+
+# Execute the linter
+${LINTER} \
+ --concurrency=4\
+ --enable-gc\
+ --vendored-linters\
+ --deadline=600s --disable-all\
+ --enable=deadcode\
+ --enable=errcheck\
+ --enable=goconst\
+ --enable=gofmt\
+ --enable=golint\
+ --enable=ineffassign\
+ --enable=interfacer\
+ --enable=megacheck\
+ --enable=misspell\
+ --enable=structcheck\
+ --enable=varcheck\
+ --enable=vet\
+ --enable=vetshadow\
+ --exclude='error return value not checked.*\(errcheck\)$'\
+ --exclude='declaration of.*err.*shadows declaration.*\(vetshadow\)$'\
+ --exclude='.*_test\.go:.*error return value not checked.*\(errcheck\)$'\
+ --exclude='duplicate of.*_test.go.*\(dupl\)$'\
+ --exclude='cmd\/client\/.*\.go.*\(dupl\)$'\
+ --exclude='vendor\/.*'\
+ --exclude='server\/seccomp\/.*\.go.*$'\
+ ${PKGS[@]}