From a61d8b3143755e916b01d60dfe8bc449199d663f Mon Sep 17 00:00:00 2001 From: Ville Vesilehto Date: Thu, 29 May 2025 07:19:04 +0300 Subject: [PATCH] lint: enable nolintlint linter (#7332) --- .golangci.yml | 1 + coremain/run.go | 1 - plugin/plugin.go | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 6389ec6ca..997a2e3aa 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -7,6 +7,7 @@ linters: - govet - ineffassign - intrange + - nolintlint - staticcheck - unconvert - unused diff --git a/coremain/run.go b/coremain/run.go index 6816dc699..56d179879 100644 --- a/coremain/run.go +++ b/coremain/run.go @@ -183,7 +183,6 @@ var ( // Build information obtained with the help of -ldflags var ( - // nolint appVersion = "(untracked dev build)" // inferred at startup devBuild = true // inferred at startup diff --git a/plugin/plugin.go b/plugin/plugin.go index ca5fe0100..b415a5533 100644 --- a/plugin/plugin.go +++ b/plugin/plugin.go @@ -70,7 +70,7 @@ func (f HandlerFunc) Name() string { return "handlerfunc" } func Error(name string, err error) error { return fmt.Errorf("%s/%s: %s", "plugin", name, err) } // NextOrFailure calls next.ServeDNS when next is not nil, otherwise it will return, a ServerFailure and a `no next plugin found` error. -func NextOrFailure(name string, next Handler, ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { // nolint: golint +func NextOrFailure(name string, next Handler, ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { if next != nil { if span := ot.SpanFromContext(ctx); span != nil { child := span.Tracer().StartSpan(next.Name(), ot.ChildOf(span.Context()))