Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit36ddc0e

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 parent79fb722 commit36ddc0e

File tree

13 files changed

+116
-21
lines changed

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/funlenv0.2.0
120120
github.com/ultraware/whitespacev0.2.0
121121
github.com/uudashr/gocognitv1.2.0
122-
github.com/uudashr/ifacev1.3.2
122+
github.com/uudashr/ifacev1.4.0
123123
github.com/valyala/quicktemplatev1.8.0
124124
github.com/xen0n/gosmopolitanv1.3.0
125125
github.com/yagipy/maintidxv1.0.0

‎go.sum‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing 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
funcanalyzersFromSettings(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
ifsettings==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-
typePingerinterface {// want "identical: interface Pinger contains identical methods or type constraintsfrom another interface, causing redundancy"
9+
typePingerinterface {// want "identical: interface'Pinger' contains identical methods or type constraintswith another interface, causing redundancy"
1010
Ping()error
1111
}
1212

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

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

31-
funcNewServer(addrstring)Server {// want "opaque: NewServer function return Server interface at the 1st result, abstract a single concrete implementation of \\*server"
31+
funcNewServer(addrstring)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
Namestring
4040
}
4141

42-
typeUserRepositoryinterface {// want "unused: interface UserRepository is declared but not used within the package"
42+
typeUserRepositoryinterface {// want "unused: interface'UserRepository' is declared but not used within the package"
4343
UserOf(idstring) (*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-
typePingerinterface {// want "identical: interface Pinger contains identical methods or type constraintsfrom another interface, causing redundancy"
27+
typePingerinterface {// want "identical: interface'Pinger' contains identical methods or type constraintswith another interface, causing redundancy"
2828
Ping()error
2929
}
3030

31-
typeHealthcheckinterface {// want "identical: interface Healthcheck contains identical methods or type constraintsfrom another interface, causing redundancy"
31+
typeHealthcheckinterface {// want "identical: interface'Healthcheck' contains identical methods or type constraintswith 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-
typePingerinterface {// want "identical: interface Pinger contains identical methods or type constraintsfrom another interface, causing redundancy"
8+
typePingerinterface {// want "identical: interface'Pinger' contains identical methods or type constraintswith another interface, causing redundancy"
99
Ping()error
1010
}
1111

12-
typeHealthcheckinterface {// want "identical: interface Healthcheck contains identical methods or type constraintsfrom another interface, causing redundancy"
12+
typeHealthcheckinterface {// want "identical: interface'Healthcheck' contains identical methods or type constraintswith 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-
typePingerinterface {// want "identical: interface Pinger contains identical methods or type constraintsfrom another interface, causing redundancy"
9+
typePingerinterface {// want "identical: interface'Pinger' contains identical methods or type constraintswith another interface, causing redundancy"
1010
Ping()error
1111
}
1212

13-
typeHealthcheckinterface {// want "identical: interface Healthcheck contains identical methods or type constraintsfrom another interface, causing redundancy"
13+
typeHealthcheckinterface {// want "identical: interface'Healthcheck' contains identical methods or type constraintswith 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
returnnil
2929
}
3030

31-
funcNewServer(addrstring)Server {// want "opaque: NewServer function return Server interface at the 1st result, abstract a single concrete implementation of \\*server"
31+
funcNewServer(addrstring)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)

[8]ページ先頭

©2009-2025 Movatter.jp