Skip to content

Commit 36ddc0e

Browse files
build(deps): bump github.com/uudashr/iface from 1.3.2 to 1.4.0 (#5820)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
1 parent 79fb722 commit 36ddc0e

13 files changed

+116
-21
lines changed

.golangci.next.reference.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,6 +1795,7 @@ linters:
17951795
- identical # Identifies interfaces in the same package that have identical method sets.
17961796
- unused # Identifies interfaces that are not used anywhere in the same package where the interface is defined.
17971797
- opaque # Identifies functions that return interfaces, but the actual returned value is always a single concrete implementation.
1798+
- unexported # Identifies interfaces that are not exported but are used in exported functions or methods.
17981799
settings:
17991800
unused:
18001801
# List of packages path to exclude from the check.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ require (
119119
github.com/ultraware/funlen v0.2.0
120120
github.com/ultraware/whitespace v0.2.0
121121
github.com/uudashr/gocognit v1.2.0
122-
github.com/uudashr/iface v1.3.2
122+
github.com/uudashr/iface v1.4.0
123123
github.com/valyala/quicktemplate v1.8.0
124124
github.com/xen0n/gosmopolitan v1.3.0
125125
github.com/yagipy/maintidx v1.0.0

go.sum

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

jsonschema/golangci.next.jsonschema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,8 @@
661661
"enum": [
662662
"identical",
663663
"unused",
664-
"opaque"
664+
"opaque",
665+
"unexported"
665666
]
666667
},
667668
"tagliatelle-cases": {

pkg/golinters/iface/iface.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55

66
"github.com/uudashr/iface/identical"
77
"github.com/uudashr/iface/opaque"
8+
"github.com/uudashr/iface/unexported"
89
"github.com/uudashr/iface/unused"
910
"golang.org/x/tools/go/analysis"
1011

@@ -28,9 +29,10 @@ func New(settings *config.IfaceSettings) *goanalysis.Linter {
2829

2930
func analyzersFromSettings(settings *config.IfaceSettings) []*analysis.Analyzer {
3031
allAnalyzers := map[string]*analysis.Analyzer{
31-
"identical": identical.Analyzer,
32-
"unused": unused.Analyzer,
33-
"opaque": opaque.Analyzer,
32+
"identical": identical.Analyzer,
33+
"unused": unused.Analyzer,
34+
"opaque": opaque.Analyzer,
35+
"unexported": unexported.Analyzer,
3436
}
3537

3638
if settings == nil || len(settings.Enable) == 0 {

pkg/golinters/iface/testdata/iface_all.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import "fmt"
66

77
// identical
88

9-
type Pinger interface { // want "identical: interface Pinger contains identical methods or type constraints from another interface, causing redundancy"
9+
type Pinger interface { // want "identical: interface 'Pinger' contains identical methods or type constraints with another interface, causing redundancy"
1010
Ping() error
1111
}
1212

13-
type Healthcheck interface { // want "identical: interface Healthcheck contains identical methods or type constraints from another interface, causing redundancy"
13+
type Healthcheck interface { // want "identical: interface 'Healthcheck' contains identical methods or type constraints with another interface, causing redundancy"
1414
Ping() error
1515
}
1616

@@ -28,7 +28,7 @@ func (s server) Serve() error {
2828
return nil
2929
}
3030

31-
func NewServer(addr string) Server { // want "opaque: NewServer function return Server interface at the 1st result, abstract a single concrete implementation of \\*server"
31+
func NewServer(addr string) Server { // want "opaque: 'NewServer' function return 'Server' interface at the 1st result, abstract a single concrete implementation of '\\*server'"
3232
return &server{addr: addr}
3333
}
3434

@@ -39,7 +39,7 @@ type User struct {
3939
Name string
4040
}
4141

42-
type UserRepository interface { // want "unused: interface UserRepository is declared but not used within the package"
42+
type UserRepository interface { // want "unused: interface 'UserRepository' is declared but not used within the package"
4343
UserOf(id string) (*User, error)
4444
}
4545

pkg/golinters/iface/testdata/iface_cgo.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ func _() {
2424

2525
// identical
2626

27-
type Pinger interface { // want "identical: interface Pinger contains identical methods or type constraints from another interface, causing redundancy"
27+
type Pinger interface { // want "identical: interface 'Pinger' contains identical methods or type constraints with another interface, causing redundancy"
2828
Ping() error
2929
}
3030

31-
type Healthcheck interface { // want "identical: interface Healthcheck contains identical methods or type constraints from another interface, causing redundancy"
31+
type Healthcheck interface { // want "identical: interface 'Healthcheck' contains identical methods or type constraints with another interface, causing redundancy"
3232
Ping() error
3333
}
3434

pkg/golinters/iface/testdata/iface_default.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import "fmt"
55

66
// identical
77

8-
type Pinger interface { // want "identical: interface Pinger contains identical methods or type constraints from another interface, causing redundancy"
8+
type Pinger interface { // want "identical: interface 'Pinger' contains identical methods or type constraints with another interface, causing redundancy"
99
Ping() error
1010
}
1111

12-
type Healthcheck interface { // want "identical: interface Healthcheck contains identical methods or type constraints from another interface, causing redundancy"
12+
type Healthcheck interface { // want "identical: interface 'Healthcheck' contains identical methods or type constraints with another interface, causing redundancy"
1313
Ping() error
1414
}
1515

pkg/golinters/iface/testdata/iface_identical.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import "fmt"
66

77
// identical
88

9-
type Pinger interface { // want "identical: interface Pinger contains identical methods or type constraints from another interface, causing redundancy"
9+
type Pinger interface { // want "identical: interface 'Pinger' contains identical methods or type constraints with another interface, causing redundancy"
1010
Ping() error
1111
}
1212

13-
type Healthcheck interface { // want "identical: interface Healthcheck contains identical methods or type constraints from another interface, causing redundancy"
13+
type Healthcheck interface { // want "identical: interface 'Healthcheck' contains identical methods or type constraints with another interface, causing redundancy"
1414
Ping() error
1515
}
1616

pkg/golinters/iface/testdata/iface_opaque.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func (s server) Serve() error {
2828
return nil
2929
}
3030

31-
func NewServer(addr string) Server { // want "opaque: NewServer function return Server interface at the 1st result, abstract a single concrete implementation of \\*server"
31+
func NewServer(addr string) Server { // want "opaque: 'NewServer' function return 'Server' interface at the 1st result, abstract a single concrete implementation of '\\*server'"
3232
return &server{addr: addr}
3333
}
3434

0 commit comments

Comments
 (0)