From 41528739cef3d2b61e9b7437f6c557e60dbb79c0 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Mon, 13 Jun 2022 16:08:46 +0200 Subject: golangci-lint: enable nolintlint The nolintlint linter does not deny the use of `//nolint` Instead it allows us to enforce a common nolint style: - force that a linter name must be specified - do not add a space between `//` and `nolint` - make sure nolint is only used when there is actually a problem Signed-off-by: Paul Holzinger --- libpod/define/container_inspect.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libpod/define/container_inspect.go') diff --git a/libpod/define/container_inspect.go b/libpod/define/container_inspect.go index e7b82d654..ccc4ae00f 100644 --- a/libpod/define/container_inspect.go +++ b/libpod/define/container_inspect.go @@ -259,9 +259,7 @@ type HealthCheckLog struct { // as possible from the spec and container config. // Some things cannot be inferred. These will be populated by spec annotations // (if available). -// Field names are fixed for compatibility and cannot be changed. -// As such, silence lint warnings about them. -//nolint +//nolint:revive,stylecheck // Field names are fixed for compatibility and cannot be changed. type InspectContainerHostConfig struct { // Binds contains an array of user-added mounts. // Both volume mounts and named volumes are included. -- cgit v1.2.3-54-g00ecf