Skip to content

Commit bd14448

Browse files
committed
updating name to embeddedstructfieldcheck
1 parent ad2d135 commit bd14448

10 files changed

+37
-37
lines changed

.golangci.next.reference.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ linters:
3232
- dupl
3333
- dupword
3434
- durationcheck
35-
- embeddedcheck
35+
- embeddedstructfieldcheck
3636
- err113
3737
- errcheck
3838
- errchkjson
@@ -141,7 +141,7 @@ linters:
141141
- dupl
142142
- dupword
143143
- durationcheck
144-
- embeddedcheck
144+
- embeddedstructfieldcheck
145145
- err113
146146
- errcheck
147147
- errchkjson

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ require (
7373
github.com/ldez/usetesting v0.4.3
7474
github.com/leonklingele/grouper v1.1.2
7575
github.com/macabu/inamedparam v0.2.0
76-
github.com/manuelarte/embeddedcheck v0.1.0
76+
github.com/manuelarte/embeddedstructfieldcheck v0.2.0
7777
github.com/manuelarte/funcorder v0.3.0
7878
github.com/maratori/testableexamples v1.0.0
7979
github.com/maratori/testpackage v1.1.1
@@ -130,8 +130,8 @@ require (
130130
go.augendre.info/fatcontext v0.8.0
131131
go.uber.org/automaxprocs v1.6.0
132132
golang.org/x/mod v0.24.0
133-
golang.org/x/sys v0.32.0
134-
golang.org/x/tools v0.32.0
133+
golang.org/x/sys v0.33.0
134+
golang.org/x/tools v0.33.0
135135
gopkg.in/yaml.v3 v3.0.1
136136
honnef.co/go/tools v0.6.1
137137
mvdan.cc/gofumpt v0.8.0
@@ -210,7 +210,7 @@ require (
210210
go.uber.org/zap v1.24.0 // indirect
211211
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
212212
golang.org/x/exp/typeparams v0.0.0-20250210185358-939b2ce775ac // indirect
213-
golang.org/x/sync v0.13.0 // indirect
213+
golang.org/x/sync v0.14.0 // indirect
214214
golang.org/x/text v0.24.0 // indirect
215215
google.golang.org/protobuf v1.36.6 // indirect
216216
gopkg.in/ini.v1 v1.67.0 // indirect

go.sum

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/golinters/embeddedcheck/testdata/embeddedcheck_special-cases.go

Lines changed: 0 additions & 11 deletions
This file was deleted.

pkg/golinters/embeddedcheck/embeddedcheck.go renamed to pkg/golinters/embeddedstructfieldcheck/embeddedstructfieldcheck.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package embeddedcheck
1+
package embeddedstructfieldcheck
22

33
import (
4-
"github.com/manuelarte/embeddedcheck/analyzer"
4+
"github.com/manuelarte/embeddedstructfieldcheck/analyzer"
55
"golang.org/x/tools/go/analysis"
66

77
"github.com/golangci/golangci-lint/v2/pkg/goanalysis"

pkg/golinters/embeddedcheck/embeddedcheck_integration_test.go renamed to pkg/golinters/embeddedstructfieldcheck/embeddedstructfieldcheck_integration_test.go

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

33
import (
44
"testing"

pkg/golinters/embeddedcheck/testdata/embeddedcheck_comments.go renamed to pkg/golinters/embeddedstructfieldcheck/testdata/embeddedstructfieldcheck_comments.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//golangcitest:args -Eembeddedcheck
1+
//golangcitest:args -Eembeddedstructfieldcheck
22
package simple
33

44
import "time"

pkg/golinters/embeddedcheck/testdata/embeddedcheck_simple.go renamed to pkg/golinters/embeddedstructfieldcheck/testdata/embeddedstructfieldcheck_simple.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//golangcitest:args -Eembeddedcheck
1+
//golangcitest:args -Eembeddedstructfieldcheck
22
package simple
33

44
import (
@@ -20,15 +20,15 @@ type NoSpaceStruct struct {
2020
type NotSortedStruct struct {
2121
version int
2222

23-
time.Time // want `embedded types should be listed before non embedded types`
23+
time.Time // want `embedded fields should be listed before regular fields`
2424
}
2525

2626
type MixedEmbeddedAndNotEmbedded struct {
2727
context.Context
2828

2929
name string
3030

31-
time.Time // want `embedded types should be listed before non embedded types`
31+
time.Time // want `embedded fields should be listed before regular fields`
3232

3333
age int
3434
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//golangcitest:args -Eembeddedstructfieldcheck
2+
package simple
3+
4+
import "time"
5+
6+
func myFunction() {
7+
type myType struct {
8+
version int
9+
time.Time // want `embedded fields should be listed before regular fields`
10+
}
11+
}

pkg/lint/lintersdb/builder_linter.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"github.com/golangci/golangci-lint/v2/pkg/golinters/dupl"
1919
"github.com/golangci/golangci-lint/v2/pkg/golinters/dupword"
2020
"github.com/golangci/golangci-lint/v2/pkg/golinters/durationcheck"
21-
"github.com/golangci/golangci-lint/v2/pkg/golinters/embeddedcheck"
21+
"github.com/golangci/golangci-lint/v2/pkg/golinters/embeddedstructfieldcheck"
2222
"github.com/golangci/golangci-lint/v2/pkg/golinters/err113"
2323
"github.com/golangci/golangci-lint/v2/pkg/golinters/errcheck"
2424
"github.com/golangci/golangci-lint/v2/pkg/golinters/errchkjson"
@@ -206,9 +206,9 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
206206
WithLoadForGoAnalysis().
207207
WithURL("https://github.com/charithe/durationcheck"),
208208

209-
linter.NewConfig(embeddedcheck.New()).
209+
linter.NewConfig(embeddedstructfieldcheck.New()).
210210
WithSince("v2.2.0").
211-
WithURL("https://github.com/manuelarte/embeddedcheck"),
211+
WithURL("https://github.com/manuelarte/embeddedstructfieldcheck"),
212212

213213
linter.NewConfig(errcheck.New(&cfg.Linters.Settings.Errcheck)).
214214
WithGroups(config.GroupStandard).

0 commit comments

Comments
 (0)