Skip to content

Commit d283c7f

Browse files
committed
*: remove interfacer linter from CI
It has been declared deprecated by the author, and has a knack for false-positives (as well as giving bad advice when it comes to APIs -- which is quite clear when looking at "nolint: interfacer" comments). Signed-off-by: Aleksa Sarai <asarai@suse.de>
1 parent 33c3200 commit d283c7f

File tree

6 files changed

+3
-9
lines changed

6 files changed

+3
-9
lines changed

daemon/container_operations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ func (daemon *Daemon) connectToNetwork(container *container.Container, idOrName
801801
return nil
802802
}
803803

804-
func updateJoinInfo(networkSettings *network.Settings, n libnetwork.Network, ep libnetwork.Endpoint) error { // nolint: interfacer
804+
func updateJoinInfo(networkSettings *network.Settings, n libnetwork.Network, ep libnetwork.Endpoint) error {
805805
if ep == nil {
806806
return errors.New("invalid enppoint whhile building portmap info")
807807
}

daemon/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ type metricsPlugin interface {
143143
StopMetrics() error
144144
}
145145

146-
func makePluginAdapter(p plugingetter.CompatPlugin) (metricsPlugin, error) { // nolint: interfacer
146+
func makePluginAdapter(p plugingetter.CompatPlugin) (metricsPlugin, error) {
147147
if pc, ok := p.(plugingetter.PluginWithV1Client); ok {
148148
return &metricsPluginAdapter{pc.Client(), p.Name()}, nil
149149
}

distribution/pull_v1.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
"time"
1414

1515
"github.com/docker/distribution/reference"
16-
"github.com/docker/distribution/registry/client/auth"
1716
"github.com/docker/distribution/registry/client/transport"
1817
"github.com/docker/docker/distribution/metadata"
1918
"github.com/docker/docker/distribution/xfer"
@@ -70,9 +69,7 @@ func (p *v1Puller) Pull(ctx context.Context, ref reference.Named, _ *specs.Platf
7069
return nil
7170
}
7271

73-
// Note use auth.Scope rather than reference.Named due to this warning causing Jenkins CI to fail:
74-
// warning: ref can be github.com/docker/docker/vendor/github.com/docker/distribution/registry/client/auth.Scope (interfacer)
75-
func (p *v1Puller) pullRepository(ctx context.Context, ref auth.Scope) error {
72+
func (p *v1Puller) pullRepository(ctx context.Context, ref reference.Named) error {
7673
progress.Message(p.config.ProgressOutput, "", "Pulling repository "+p.repoInfo.Name.Name())
7774

7875
tagged, isTagged := ref.(reference.NamedTagged)

distribution/push_v2.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,6 @@ func (bla byLikeness) Swap(i, j int) {
649649
}
650650
func (bla byLikeness) Len() int { return len(bla.arr) }
651651

652-
// nolint: interfacer
653652
func sortV2MetadataByLikenessAndAge(repoInfo reference.Named, hmacKey []byte, marr []metadata.V2Metadata) {
654653
// reverse the metadata array to shift the newest entries to the beginning
655654
for i := 0; i < len(marr)/2; i++ {

hack/validate/gometalinter.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"golint",
1919
"gosimple",
2020
"ineffassign",
21-
"interfacer",
2221
"unconvert",
2322
"vet"
2423
],

registry/auth.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ func (err PingResponseError) Error() string {
248248
// challenge manager for the supported authentication types and
249249
// whether v2 was confirmed by the response. If a response is received but
250250
// cannot be interpreted a PingResponseError will be returned.
251-
// nolint: interfacer
252251
func PingV2Registry(endpoint *url.URL, transport http.RoundTripper) (challenge.Manager, bool, error) {
253252
var (
254253
foundV2 = false

0 commit comments

Comments
 (0)