mirror of https://github.com/databricks/cli.git
use //nolint: comment instead of central config
This more precise, only affects a given line and not all matching lines.
This commit is contained in:
parent
0027c654f1
commit
d4d0a36087
|
@ -17,7 +17,3 @@ linters-settings:
|
||||||
replacement: 'a[b:]'
|
replacement: 'a[b:]'
|
||||||
issues:
|
issues:
|
||||||
exclude-dirs-use-default: false # recommended by docs https://golangci-lint.run/usage/false-positives/
|
exclude-dirs-use-default: false # recommended by docs https://golangci-lint.run/usage/false-positives/
|
||||||
exclude:
|
|
||||||
# Excluded because they are currently failing. Once fixed, these exceptions should be removed from here:
|
|
||||||
- "SA1019: tfexec.State is deprecated: The -state CLI flag is a legacy flag and should not be used. If you need a different state file for every run, you can instead use the local backend. See https://github.com/hashicorp/terraform/issues/25920#issuecomment-676560799"
|
|
||||||
- "SA1012: do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use"
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ func (m *importResource) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagn
|
||||||
tf.SetStdout(buf)
|
tf.SetStdout(buf)
|
||||||
|
|
||||||
//lint:ignore SA1019 We use legacy -state flag for now to plan the import changes based on temporary state file
|
//lint:ignore SA1019 We use legacy -state flag for now to plan the import changes based on temporary state file
|
||||||
|
//nolint:staticcheck
|
||||||
changed, err := tf.Plan(ctx, tfexec.State(tmpState), tfexec.Target(importAddress))
|
changed, err := tf.Plan(ctx, tfexec.State(tmpState), tfexec.Target(importAddress))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return diag.Errorf("terraform plan: %v", err)
|
return diag.Errorf("terraform plan: %v", err)
|
||||||
|
|
|
@ -251,7 +251,7 @@ func (t *cobraTestRunner) RunBackground() {
|
||||||
// These commands are globals so we have to clean up to the best of our ability after each run.
|
// 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
|
// See https://github.com/spf13/cobra/blob/a6f198b635c4b18fff81930c40d464904e55b161/command.go#L1062-L1066
|
||||||
//lint:ignore SA1012 cobra sets the context and doesn't clear it
|
//lint:ignore SA1012 cobra sets the context and doesn't clear it
|
||||||
cli.SetContext(nil)
|
cli.SetContext(nil) //nolint:staticcheck
|
||||||
|
|
||||||
// Make caller aware of error.
|
// Make caller aware of error.
|
||||||
errch <- err
|
errch <- err
|
||||||
|
|
Loading…
Reference in New Issue