mirror of https://github.com/databricks/cli.git
Fix linter messages
This commit is contained in:
parent
3b63fb20d4
commit
9098320c63
|
@ -159,9 +159,9 @@ func validateProductionMode(ctx context.Context, b *bundle.Bundle, isPrincipalUs
|
|||
// and neither is setting a principal.
|
||||
// We only show a warning for these cases since we didn't historically
|
||||
// report an error for them.
|
||||
return diag.Recommendation("target with 'mode: production' should " + advice)
|
||||
return diag.Recommendationf("target with 'mode: production' should %s", advice)
|
||||
}
|
||||
return diag.Errorf("target with 'mode: production' must " + advice)
|
||||
return diag.Errorf("target with 'mode: production' must %s", advice)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -86,6 +86,16 @@ func Infof(format string, args ...any) Diagnostics {
|
|||
}
|
||||
}
|
||||
|
||||
// Recommendationf creates a new recommendation diagnostic.
|
||||
func Recommendationf(format string, args ...any) Diagnostics {
|
||||
return []Diagnostic{
|
||||
{
|
||||
Severity: Recommendation,
|
||||
Summary: fmt.Sprintf(format, args...),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// Diagnostics holds zero or more instances of [Diagnostic].
|
||||
type Diagnostics []Diagnostic
|
||||
|
||||
|
|
Loading…
Reference in New Issue