static checker

This commit is contained in:
Omar Ismail 2021-09-22 18:12:51 -04:00 committed by Chris Arcand
parent 594a390f84
commit a94b2405b1
2 changed files with 4 additions and 2 deletions

View File

@ -922,7 +922,7 @@ func (b *Cloud) VerifyWorkspaceTerraformVersion(workspaceName string) tfdiags.Di
// If the workspace has remote operations disabled, the remote Terraform // If the workspace has remote operations disabled, the remote Terraform
// version is effectively meaningless, so we'll skip version verification. // version is effectively meaningless, so we'll skip version verification.
if workspace.Operations == false { if !workspace.Operations {
return nil return nil
} }
@ -1002,6 +1002,7 @@ func (b *Cloud) IsLocalOperations() bool {
// as a helper to wrap any potentially colored strings. // as a helper to wrap any potentially colored strings.
// //
// TODO SvH: Rename this back to Colorize as soon as we can pass -no-color. // TODO SvH: Rename this back to Colorize as soon as we can pass -no-color.
//lint:ignore U1000 see above todo
func (b *Cloud) cliColorize() *colorstring.Colorize { func (b *Cloud) cliColorize() *colorstring.Colorize {
if b.CLIColor != nil { if b.CLIColor != nil {
return b.CLIColor return b.CLIColor

View File

@ -1592,8 +1592,9 @@ func TestCloud_applyVersionCheck(t *testing.T) {
} }
// RUN: prepare the apply operation and run it // RUN: prepare the apply operation and run it
op, configCleanup, done := testOperationApply(t, "./testdata/apply") op, configCleanup, opDone := testOperationApply(t, "./testdata/apply")
defer configCleanup() defer configCleanup()
defer opDone(t)
streams, done := terminal.StreamsForTesting(t) streams, done := terminal.StreamsForTesting(t)
view := views.NewOperation(arguments.ViewHuman, false, views.NewView(streams)) view := views.NewOperation(arguments.ViewHuman, false, views.NewView(streams))