From 4639a73343851fc15fe442f280c73059d7673dd5 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Wed, 4 Dec 2024 16:20:56 +0100 Subject: [PATCH] merge comments from old lint:ignore directives into //nolint --- bundle/deploy/terraform/import.go | 3 +-- internal/helpers.go | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bundle/deploy/terraform/import.go b/bundle/deploy/terraform/import.go index 5c2937cd2..0a1d1b9ce 100644 --- a/bundle/deploy/terraform/import.go +++ b/bundle/deploy/terraform/import.go @@ -56,8 +56,7 @@ func (m *importResource) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagn buf := bytes.NewBuffer(nil) tf.SetStdout(buf) - //lint:ignore SA1019 We use legacy -state flag for now to plan the import changes based on temporary state file - //nolint:staticcheck + //nolint:staticcheck // SA1019 We use legacy -state flag for now to plan the import changes based on temporary state file changed, err := tf.Plan(ctx, tfexec.State(tmpState), tfexec.Target(importAddress)) if err != nil { return diag.Errorf("terraform plan: %v", err) diff --git a/internal/helpers.go b/internal/helpers.go index c203e390d..7cd2b578b 100644 --- a/internal/helpers.go +++ b/internal/helpers.go @@ -250,8 +250,8 @@ func (t *cobraTestRunner) RunBackground() { // Reset context on command for the next test. // These commands are globals so we have to clean up to the best of our ability after each run. // See https://github.com/spf13/cobra/blob/a6f198b635c4b18fff81930c40d464904e55b161/command.go#L1062-L1066 - //lint:ignore SA1012 cobra sets the context and doesn't clear it - cli.SetContext(nil) //nolint:staticcheck + //nolint:staticcheck // cobra sets the context and doesn't clear it + cli.SetContext(nil) // Make caller aware of error. errch <- err