-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix staticcheck
warnings | Resolve all but one TODO
comments
#191
Conversation
251cc46
to
01a652a
Compare
staticcheck
warningsstaticcheck
warnings | Resolve some TODO
comments
@@ -101,26 +100,11 @@ func resourceService() *schema.Resource { | |||
ForceNew: false, | |||
Optional: true, | |||
Elem: &schema.Schema{Type: schema.TypeString}, | |||
// ValidateFunc: validateServiceTags, // TODO: Not Yet Supported |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This TODO
item isn't valid because ValidateFunc
does not work on schema.TypeList
. Source:
// ValidateFunc is honored only when the schema's Type is set to TypeInt,
// TypeFloat, TypeString, TypeBool, or TypeMap. It is ignored for all other types.
ValidateFunc [SchemaValidateFunc](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-sdk/helper/[email protected]#SchemaValidateFunc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There already exists examples of adding tags to services that the user can refer to. If the list is invalid they will get an API error anyways.
staticcheck
warnings | Resolve some TODO
commentsstaticcheck
warnings | Resolve all but one TODO
comments
Issues
Part of: https://github.com/OpsLevel/team-platform/issues/186
Changelog
if cond == true
to becomeif cond
lifecycle_alias
andtier_alias
should actually be mandatoryexistingTags
var inreconcileTags()
is never used, staticcheck complained about this.TODO
in team -managed_aliases
bug does not affect Team.TODO
in Service because the provider doesn't supportValidateFunc
on a type list.changie
entryTophatting
I tophatted the
reconcileTags()
change to make surelifecycle_alias
andtier_alias
were actually required and to make sure thatexistingTags
wasn't a used variable. It worked.For
managed_aliases
tophatting on Team resource: