1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

*: 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>
This commit is contained in:
Aleksa Sarai 2019-03-13 10:37:35 +11:00
parent 33c3200e0d
commit d283c7fa2b
No known key found for this signature in database
GPG key ID: 9E18AA267DDB8DB4
6 changed files with 3 additions and 9 deletions

View file

@ -801,7 +801,7 @@ func (daemon *Daemon) connectToNetwork(container *container.Container, idOrName
return nil return nil
} }
func updateJoinInfo(networkSettings *network.Settings, n libnetwork.Network, ep libnetwork.Endpoint) error { // nolint: interfacer func updateJoinInfo(networkSettings *network.Settings, n libnetwork.Network, ep libnetwork.Endpoint) error {
if ep == nil { if ep == nil {
return errors.New("invalid enppoint whhile building portmap info") return errors.New("invalid enppoint whhile building portmap info")
} }

View file

@ -143,7 +143,7 @@ type metricsPlugin interface {
StopMetrics() error StopMetrics() error
} }
func makePluginAdapter(p plugingetter.CompatPlugin) (metricsPlugin, error) { // nolint: interfacer func makePluginAdapter(p plugingetter.CompatPlugin) (metricsPlugin, error) {
if pc, ok := p.(plugingetter.PluginWithV1Client); ok { if pc, ok := p.(plugingetter.PluginWithV1Client); ok {
return &metricsPluginAdapter{pc.Client(), p.Name()}, nil return &metricsPluginAdapter{pc.Client(), p.Name()}, nil
} }

View file

@ -13,7 +13,6 @@ import (
"time" "time"
"github.com/docker/distribution/reference" "github.com/docker/distribution/reference"
"github.com/docker/distribution/registry/client/auth"
"github.com/docker/distribution/registry/client/transport" "github.com/docker/distribution/registry/client/transport"
"github.com/docker/docker/distribution/metadata" "github.com/docker/docker/distribution/metadata"
"github.com/docker/docker/distribution/xfer" "github.com/docker/docker/distribution/xfer"
@ -70,9 +69,7 @@ func (p *v1Puller) Pull(ctx context.Context, ref reference.Named, _ *specs.Platf
return nil return nil
} }
// Note use auth.Scope rather than reference.Named due to this warning causing Jenkins CI to fail: func (p *v1Puller) pullRepository(ctx context.Context, ref reference.Named) error {
// warning: ref can be github.com/docker/docker/vendor/github.com/docker/distribution/registry/client/auth.Scope (interfacer)
func (p *v1Puller) pullRepository(ctx context.Context, ref auth.Scope) error {
progress.Message(p.config.ProgressOutput, "", "Pulling repository "+p.repoInfo.Name.Name()) progress.Message(p.config.ProgressOutput, "", "Pulling repository "+p.repoInfo.Name.Name())
tagged, isTagged := ref.(reference.NamedTagged) tagged, isTagged := ref.(reference.NamedTagged)

View file

@ -649,7 +649,6 @@ func (bla byLikeness) Swap(i, j int) {
} }
func (bla byLikeness) Len() int { return len(bla.arr) } func (bla byLikeness) Len() int { return len(bla.arr) }
// nolint: interfacer
func sortV2MetadataByLikenessAndAge(repoInfo reference.Named, hmacKey []byte, marr []metadata.V2Metadata) { func sortV2MetadataByLikenessAndAge(repoInfo reference.Named, hmacKey []byte, marr []metadata.V2Metadata) {
// reverse the metadata array to shift the newest entries to the beginning // reverse the metadata array to shift the newest entries to the beginning
for i := 0; i < len(marr)/2; i++ { for i := 0; i < len(marr)/2; i++ {

View file

@ -18,7 +18,6 @@
"golint", "golint",
"gosimple", "gosimple",
"ineffassign", "ineffassign",
"interfacer",
"unconvert", "unconvert",
"vet" "vet"
], ],

View file

@ -248,7 +248,6 @@ func (err PingResponseError) Error() string {
// challenge manager for the supported authentication types and // challenge manager for the supported authentication types and
// whether v2 was confirmed by the response. If a response is received but // whether v2 was confirmed by the response. If a response is received but
// cannot be interpreted a PingResponseError will be returned. // cannot be interpreted a PingResponseError will be returned.
// nolint: interfacer
func PingV2Registry(endpoint *url.URL, transport http.RoundTripper) (challenge.Manager, bool, error) { func PingV2Registry(endpoint *url.URL, transport http.RoundTripper) (challenge.Manager, bool, error) {
var ( var (
foundV2 = false foundV2 = false