From 6293bb4ee80cb693dc7ac461a19f8b85dc9f6b27 Mon Sep 17 00:00:00 2001 From: Stephen Benjamin Date: Wed, 6 Apr 2022 20:02:58 -0400 Subject: [PATCH] Fix items from checklist - Alphabetized manager.go - Added go glangci.example.yml - Used tag for go.mod --- .golangci.example.yml | 2 ++ go.mod | 2 +- go.sum | 4 ++-- pkg/lint/lintersdb/manager.go | 10 +++++----- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.golangci.example.yml b/.golangci.example.yml index f2f97c92d877..f9575b92f8d6 100644 --- a/.golangci.example.yml +++ b/.golangci.example.yml @@ -1662,6 +1662,7 @@ linters: - goprintffuncname - gosec - gosimple + - gosprintfhostport - govet - ifshort - importas @@ -1752,6 +1753,7 @@ linters: - goprintffuncname - gosec - gosimple + - gosprintfhostport - govet - ifshort - importas diff --git a/go.mod b/go.mod index df7411628af0..80b5b4cf00bf 100644 --- a/go.mod +++ b/go.mod @@ -156,7 +156,7 @@ require ( github.com/spf13/afero v1.8.2 // indirect github.com/spf13/cast v1.4.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/stbenjam/go-sprintf-host-port v0.0.0-20220406232701-e6c52ffc7e9c // indirect + github.com/stbenjam/go-sprintf-host-port v0.0.1 github.com/stretchr/objx v0.1.1 // indirect github.com/subosito/gotenv v1.2.0 // indirect github.com/tklauser/go-sysconf v0.3.10 // indirect diff --git a/go.sum b/go.sum index b247e51918ef..0a1af793bae7 100644 --- a/go.sum +++ b/go.sum @@ -703,8 +703,8 @@ github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= -github.com/stbenjam/go-sprintf-host-port v0.0.0-20220406232701-e6c52ffc7e9c h1:2Yj2o3KLwc+8v+JvRN47OlufMOfI0PllzKjp43mkgu0= -github.com/stbenjam/go-sprintf-host-port v0.0.0-20220406232701-e6c52ffc7e9c/go.mod h1:zL9IPLqGeN2rek8FGf1SCvR90PPflm9wfrWaAHfB68I= +github.com/stbenjam/go-sprintf-host-port v0.0.1 h1:GIYVAMLV4f5WBe0NgilYOlmUYE2KYKJaf4teZbXKF7I= +github.com/stbenjam/go-sprintf-host-port v0.0.1/go.mod h1:zL9IPLqGeN2rek8FGf1SCvR90PPflm9wfrWaAHfB68I= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/pkg/lint/lintersdb/manager.go b/pkg/lint/lintersdb/manager.go index a76752aac648..9bdea3485fed 100644 --- a/pkg/lint/lintersdb/manager.go +++ b/pkg/lint/lintersdb/manager.go @@ -407,11 +407,6 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config { WithPresets(linter.PresetStyle). WithURL("https://github.com/jirfag/go-printf-func-name"), - linter.NewConfig(golinters.NewGoSprintfHostPort()). - WithSince("v1.46.0"). - WithPresets(linter.PresetStyle). - WithURL("https://github.com/stbenjam/go-sprintf-host-port"), - linter.NewConfig(golinters.NewGosec(gosecCfg)). WithSince("v1.0.0"). WithLoadForGoAnalysis(). @@ -426,6 +421,11 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config { WithAlternativeNames(megacheckName). WithURL("https://github.com/dominikh/go-tools/tree/master/simple"), + linter.NewConfig(golinters.NewGoSprintfHostPort()). + WithSince("v1.46.0"). + WithPresets(linter.PresetStyle). + WithURL("https://github.com/stbenjam/go-sprintf-host-port"), + linter.NewConfig(golinters.NewGovet(govetCfg)). WithSince("v1.0.0"). WithLoadForGoAnalysis().