summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-01-13 11:13:59 +0100
committerValentin Rothberg <rothberg@redhat.com>2020-01-13 11:20:44 +0100
commit17988f239e0b889a8d0b0fcb7f91380b57a9673e (patch)
tree1ea5aba3fab290b048ebed0e42addfb6d87d4c37
parent9e2e4d7615311b38b1e553af32a5666888ef3c96 (diff)
downloadpodman-17988f239e0b889a8d0b0fcb7f91380b57a9673e.tar.gz
podman-17988f239e0b889a8d0b0fcb7f91380b57a9673e.tar.bz2
podman-17988f239e0b889a8d0b0fcb7f91380b57a9673e.zip
remove `.tool/lint`
We should only use `make golangci-lint` which is also used in `make validate`. However, we need to enable more linters which we can do step by step in future commits. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
-rwxr-xr-x.tool/lint46
-rw-r--r--Makefile4
2 files changed, 1 insertions, 49 deletions
diff --git a/.tool/lint b/.tool/lint
deleted file mode 100755
index aa6891251..000000000
--- a/.tool/lint
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/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*' -a -not -iwholename './_output*' -a -not -iwholename '*ioprojectatomicpodman.go')
-
-echo $PKGS
-
-# Execute the linter
-${LINTER} \
- --concurrency=4\
- --enable-gc\
- --vendored-linters\
- --deadline=600s --disable-all\
- --enable=deadcode\
- --enable=errcheck\
- --enable=gofmt\
- --enable=golint\
- --enable=ineffassign\
- --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='podman\/.*'\
- --exclude='server\/seccomp\/.*\.go.*$'\
- --exclude='dependencies\/.*'\
- ${PKGS[@]}
diff --git a/Makefile b/Makefile
index 3530b73c9..af096ca3c 100644
--- a/Makefile
+++ b/Makefile
@@ -148,9 +148,7 @@ ifeq ("$(wildcard $(GOPKGDIR))","")
endif
touch $@
-lint: .gopathok varlink_generate ## Execute the source code linter
- @echo "checking lint"
- @./.tool/lint
+lint: golangci-lint
golangci-lint: .gopathok varlink_generate .install.golangci-lint
$(GOBIN)/golangci-lint run --tests=false --skip-files swagger.go