From 53eff1469e2443d8f9d6a68ed7cb9c027d05b412 Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Tue, 4 May 2021 18:27:23 +0200 Subject: [PATCH] golangci-lint: switch to fieldalignment fieldalignment replaces maligned. Errors related to pointer ordering (for GC) are ignored; see https://github.com/golang/go/issues/44877 for details. Fixes: #1252 Signed-off-by: Stephen Kitt --- .golangci.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 9619adf1a..86e523ca3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -11,10 +11,11 @@ linters-settings: - unnamedResult gocyclo: min-complexity: 20 + govet: + enable: + - fieldalignment lll: line-length: 140 - maligned: - suggest-new: true linters: disable-all: true enable: @@ -39,7 +40,6 @@ linters: - ineffassign - interfacer - lll - - maligned - misspell - nakedret - prealloc @@ -83,3 +83,9 @@ issues: - stylecheck text: "ST1001: " path: test + + # Ignore pointer bytes in struct alignment tests (this is a very + # minor optimisation) + - linters: + - govet + text: "pointer bytes could be"