Skip to content

Commit 34b9773

Browse files
committed
chore: groups goprintffuncname files to a package
1 parent 1383df1 commit 34b9773

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

pkg/golinters/goprintffuncname.go renamed to pkg/golinters/goprintffuncname/goprintffuncname.go

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

33
import (
44
"github.com/jirfag/go-printf-func-name/pkg/analyzer"
@@ -7,7 +7,7 @@ import (
77
"github.com/golangci/golangci-lint/pkg/goanalysis"
88
)
99

10-
func NewGoPrintfFuncName() *goanalysis.Linter {
10+
func New() *goanalysis.Linter {
1111
a := analyzer.Analyzer
1212

1313
return goanalysis.NewLinter(
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package goprintffuncname
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/lint/lintersdb/builder_linter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ import (
4848
"github.com/golangci/golangci-lint/pkg/golinters/goimports"
4949
"github.com/golangci/golangci-lint/pkg/golinters/gomoddirectives"
5050
"github.com/golangci/golangci-lint/pkg/golinters/gomodguard"
51+
"github.com/golangci/golangci-lint/pkg/golinters/goprintffuncname"
5152
"github.com/golangci/golangci-lint/pkg/golinters/loggercheck"
5253
"github.com/golangci/golangci-lint/pkg/golinters/mirror"
5354
"github.com/golangci/golangci-lint/pkg/golinters/misspell"
@@ -372,7 +373,7 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
372373
WithPresets(linter.PresetStyle, linter.PresetImport, linter.PresetModule).
373374
WithURL("https://github.com/ryancurrah/gomodguard"),
374375

375-
linter.NewConfig(golinters.NewGoPrintfFuncName()).
376+
linter.NewConfig(goprintffuncname.New()).
376377
WithSince("v1.23.0").
377378
WithPresets(linter.PresetStyle).
378379
WithURL("https://github.com/jirfag/go-printf-func-name"),

0 commit comments

Comments
 (0)