Skip to content

Commit 09db8f9

Browse files
committed
chore: groups thelper files to a package
1 parent 10cba1a commit 09db8f9

File tree

7 files changed

+16
-4
lines changed

7 files changed

+16
-4
lines changed
File renamed without changes.

test/testdata/thelper_with_options.go renamed to pkg/golinters/thelper/testdata/thelper_with_options.go

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

55
import "testing"

pkg/golinters/thelper.go renamed to pkg/golinters/thelper/thelper.go

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

33
import (
44
"strings"
@@ -12,7 +12,7 @@ import (
1212
"github.com/golangci/golangci-lint/pkg/golinters/internal"
1313
)
1414

15-
func NewThelper(cfg *config.ThelperSettings) *goanalysis.Linter {
15+
func New(cfg *config.ThelperSettings) *goanalysis.Linter {
1616
a := analyzer.NewAnalyzer()
1717

1818
opts := map[string]struct{}{
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package thelper
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
@@ -97,6 +97,7 @@ import (
9797
"github.com/golangci/golangci-lint/pkg/golinters/testableexamples"
9898
"github.com/golangci/golangci-lint/pkg/golinters/testifylint"
9999
"github.com/golangci/golangci-lint/pkg/golinters/testpackage"
100+
"github.com/golangci/golangci-lint/pkg/golinters/thelper"
100101
"github.com/golangci/golangci-lint/pkg/golinters/whitespace"
101102
"github.com/golangci/golangci-lint/pkg/golinters/zerologlint"
102103
"github.com/golangci/golangci-lint/pkg/lint/linter"
@@ -726,7 +727,7 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
726727
WithPresets(linter.PresetStyle, linter.PresetTest).
727728
WithURL("https://github.com/maratori/testpackage"),
728729

729-
linter.NewConfig(golinters.NewThelper(&cfg.LintersSettings.Thelper)).
730+
linter.NewConfig(thelper.New(&cfg.LintersSettings.Thelper)).
730731
WithSince("v1.34.0").
731732
WithPresets(linter.PresetStyle).
732733
WithLoadForGoAnalysis().

0 commit comments

Comments
 (0)