Skip to content

Commit b3d900d

Browse files
committed
chore: groups govet files to a package
1 parent 66e9327 commit b3d900d

File tree

11 files changed

+23
-11
lines changed

11 files changed

+23
-11
lines changed

pkg/golinters/govet.go renamed to pkg/golinters/govet/govet.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package golinters
1+
package govet
22

33
import (
44
"slices"
@@ -139,11 +139,11 @@ var (
139139
)
140140

141141
var (
142-
govetDebugf = logutils.Debug(logutils.DebugKeyGovet)
143-
isGovetDebug = logutils.HaveDebugTag(logutils.DebugKeyGovet)
142+
debugf = logutils.Debug(logutils.DebugKeyGovet)
143+
isDebug = logutils.HaveDebugTag(logutils.DebugKeyGovet)
144144
)
145145

146-
func NewGovet(settings *config.GovetSettings) *goanalysis.Linter {
146+
func New(settings *config.GovetSettings) *goanalysis.Linter {
147147
var conf map[string]map[string]any
148148
if settings != nil {
149149
conf = settings.Settings
@@ -208,7 +208,7 @@ func isAnalyzerEnabled(name string, cfg *config.GovetSettings, defaultAnalyzers
208208
}
209209

210210
func debugAnalyzersListf(analyzers []*analysis.Analyzer, message string) {
211-
if !isGovetDebug {
211+
if !isDebug {
212212
return
213213
}
214214

@@ -219,5 +219,5 @@ func debugAnalyzersListf(analyzers []*analysis.Analyzer, message string) {
219219

220220
sort.Strings(analyzerNames)
221221

222-
govetDebugf("%s (%d): %s", message, len(analyzerNames), analyzerNames)
222+
debugf("%s (%d): %s", message, len(analyzerNames), analyzerNames)
223223
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package govet
2+
3+
import (
4+
"testing"
5+
6+
"github.com/golangci/golangci-lint/test/testshared/integration"
7+
)
8+
9+
func TestFromTestdata(t *testing.T) {
10+
integration.RunTestdata(t)
11+
}

pkg/golinters/govet_test.go renamed to pkg/golinters/govet/govet_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package golinters
1+
package govet
22

33
import (
44
"slices"

test/testdata/govet.go renamed to pkg/golinters/govet/testdata/govet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//golangcitest:args -Egovet
2-
//golangcitest:config_path testdata/configs/govet.yml
2+
//golangcitest:config_path testdata/govet.yml
33
package testdata
44

55
import (

test/testdata/govet_fieldalignment.go renamed to pkg/golinters/govet/testdata/govet_fieldalignment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//golangcitest:args -Egovet
2-
//golangcitest:config_path testdata/configs/govet_fieldalignment.yml
2+
//golangcitest:config_path testdata/govet_fieldalignment.yml
33
package testdata
44

55
type gvfaGood struct {

test/testdata/govet_ifaceassert.go renamed to pkg/golinters/govet/testdata/govet_ifaceassert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//golangcitest:args -Egovet
2-
//golangcitest:config_path testdata/configs/govet_ifaceassert.yml
2+
//golangcitest:config_path testdata/govet_ifaceassert.yml
33
package testdata
44

55
import (

0 commit comments

Comments
 (0)