summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatej Vasek <mvasek@redhat.com>2021-02-09 19:23:32 +0100
committerMatej Vasek <mvasek@redhat.com>2021-02-10 13:25:40 +0100
commit68133414f42483c5122d2fe6916e179cbbb9d756 (patch)
treec90101746e07b03231cb4aa0993aee8c127aba32
parent2d829aeb1fe0dc19c45e796141ab78ff192b5dbb (diff)
downloadpodman-68133414f42483c5122d2fe6916e179cbbb9d756.tar.gz
podman-68133414f42483c5122d2fe6916e179cbbb9d756.tar.bz2
podman-68133414f42483c5122d2fe6916e179cbbb9d756.zip
[NO TESTS NEEDED] Update linter
Signed-off-by: Matej Vasek <mvasek@redhat.com>
-rw-r--r--.golangci.yml29
-rw-r--r--Makefile2
-rw-r--r--dependencies/dependencies.go2
-rwxr-xr-xhack/golangci-lint.sh2
-rw-r--r--pkg/domain/infra/abi/manifest.go2
5 files changed, 33 insertions, 4 deletions
diff --git a/.golangci.yml b/.golangci.yml
index da22b7602..6e46d55cd 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -4,6 +4,7 @@ run:
deadline: 5m
skip-dirs-use-default: true
skip-dirs:
+ - dependencies
- contrib
- dependencies
- test
@@ -17,6 +18,34 @@ linters:
enable-all: true
disable:
# All these break for one reason or another
+ - nolintlint
+ - gocognit
+ - stylecheck
+ - testpackage
+ - goerr113
+ - exhaustivestruct
+ - errorlint
+ - wrapcheck
+ - paralleltest
+ - wsl
+ - godox
+ - tparallel
+ - gomnd
+ - nlreturn
+ - noctx
+ - nestif
+ - predeclared
+ - thelper
+ - ifshort
+ - staticcheck
+ - forbidigo
+ - exhaustive
+ - whitespace
+ - unparam
+ - gofumpt
+ - gci
+ - godot
+ - makezero
- dupl
- funlen
- gochecknoglobals
diff --git a/Makefile b/Makefile
index f9674afe4..33099fac7 100644
--- a/Makefile
+++ b/Makefile
@@ -619,7 +619,7 @@ endef
.PHONY: .install.golangci-lint
.install.golangci-lint: .gopathok
- VERSION=1.18.0 GOBIN=$(GOBIN) sh ./hack/install_golangci.sh
+ VERSION=1.36.0 GOBIN=$(GOBIN) sh ./hack/install_golangci.sh
.PHONY: .install.bats
.install.bats: .gopathok
diff --git a/dependencies/dependencies.go b/dependencies/dependencies.go
index b03ab149b..b1b0aee08 100644
--- a/dependencies/dependencies.go
+++ b/dependencies/dependencies.go
@@ -1,3 +1,5 @@
+// +build !linter
+
package dependencies
import (
diff --git a/hack/golangci-lint.sh b/hack/golangci-lint.sh
index 5be750129..bcb83a2fd 100755
--- a/hack/golangci-lint.sh
+++ b/hack/golangci-lint.sh
@@ -5,7 +5,7 @@ set -e
declare -A BUILD_TAGS
# TODO: add systemd tag
-BUILD_TAGS[default]="apparmor,seccomp,selinux"
+BUILD_TAGS[default]="apparmor,seccomp,selinux,linter"
BUILD_TAGS[abi]="${BUILD_TAGS[default]},!remoteclient"
BUILD_TAGS[tunnel]="${BUILD_TAGS[default]},remote,remoteclient"
diff --git a/pkg/domain/infra/abi/manifest.go b/pkg/domain/infra/abi/manifest.go
index 626f1f7bf..da7482407 100644
--- a/pkg/domain/infra/abi/manifest.go
+++ b/pkg/domain/infra/abi/manifest.go
@@ -1,5 +1,3 @@
-// +build !remote
-
package abi
import (