From a4c3efe7835150f4eca031b24d79de7144d1b8f5 Mon Sep 17 00:00:00 2001 From: Justin Chadwell Date: Wed, 19 Oct 2022 15:11:23 +0100 Subject: [PATCH] lint: add nolintlint and fix violations We should be able to detect nolint comments that point to linters that are disabled (such as with the removed structcheck). Signed-off-by: Justin Chadwell --- .golangci.yml | 1 + commands/build.go | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 52ea92cc..177f18f1 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -21,6 +21,7 @@ linters: - revive - staticcheck - typecheck + - nolintlint disable-all: true linters-settings: diff --git a/commands/build.go b/commands/build.go index 83d9806c..42be0690 100644 --- a/commands/build.go +++ b/commands/build.go @@ -81,10 +81,7 @@ type commonOptions struct { progress string pull *bool - // golangci-lint#826 - // nolint:structcheck exportPush bool - // nolint:structcheck exportLoad bool }