From 46c2182adea292289aacb2b74ba6f44003b0f53a Mon Sep 17 00:00:00 2001 From: Harald Sitter Date: Tue, 31 Oct 2017 12:24:31 +0100 Subject: [PATCH] fix linting by using new maligned linter instead of aligncheck upstream switched the alignment check backend and in doing so fails to run if the old backend is defined in the config. also skip alignment linting on a struct we use for byte decoding as we have no choice in its member order. --- deb/remote.go | 2 +- linter.json | 2 +- utils/config.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deb/remote.go b/deb/remote.go index ac1cb151..5c365c97 100644 --- a/deb/remote.go +++ b/deb/remote.go @@ -592,7 +592,7 @@ func (repo *RemoteRepo) Decode(input []byte) error { if err != nil { if strings.HasPrefix(err.Error(), "codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80") { // probably it is broken DB from go < 1.2, try decoding w/o time.Time - var repo11 struct { + var repo11 struct { // nolint: maligned UUID string Name string ArchiveRoot string diff --git a/linter.json b/linter.json index 37a32567..2f221d88 100644 --- a/linter.json +++ b/linter.json @@ -12,7 +12,7 @@ "staticcheck", "varcheck", "structcheck", - "aligncheck", + "maligned", "vetshadow", "goconst", "interfacer" diff --git a/utils/config.go b/utils/config.go index 39333d34..01b792ce 100644 --- a/utils/config.go +++ b/utils/config.go @@ -7,7 +7,7 @@ import ( ) // ConfigStructure is structure of main configuration -type ConfigStructure struct { // nolint: aligncheck +type ConfigStructure struct { // nolint: maligned RootDir string `json:"rootDir"` DownloadConcurrency int `json:"downloadConcurrency"` DownloadLimit int64 `json:"downloadSpeedLimit"`