Skip to content

Commit e011ef3

Browse files
committed
Fix linter warnings
Signed-off-by: Timo Sand <[email protected]>
1 parent 87de13d commit e011ef3

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

github/resource_github_issue_labels_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ func testAccGithubIssueLabelsConfig(repoName string, labels []map[string]any) st
8585
if labels != nil {
8686
var dynamic strings.Builder
8787
for _, label := range labels {
88-
dynamic.WriteString(fmt.Sprintf(`
88+
fmt.Fprintf(&dynamic, `
8989
label {
9090
name = "%s"
9191
color = "%s"
9292
description = "%s"
9393
}
94-
`, label["name"], label["color"], label["description"]))
94+
`, label["name"], label["color"], label["description"])
9595
}
9696

9797
resource = fmt.Sprintf(`

github/resource_github_repository.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ func resourceGithubRepositoryObject(d *schema.ResourceData) *github.Repository {
631631

632632
// only configure allow forking if repository is not public
633633
if visibility != "public" && (d.IsNewResource() || d.HasChange("allow_forking")) {
634-
if allowForking, ok := d.GetOkExists("allow_forking"); ok { //nolint:staticcheck,SA1019 // We sometimes need to use GetOkExists for booleans
634+
if allowForking, ok := d.GetOkExists("allow_forking"); ok { //nolint:staticcheck //SA1019 // We sometimes need to use GetOkExists for booleans
635635
if val, ok := allowForking.(bool); ok {
636636
repository.AllowForking = github.Ptr(val)
637637
}
@@ -1001,7 +1001,7 @@ func resourceGithubRepositoryUpdate(ctx context.Context, d *schema.ResourceData,
10011001
}
10021002

10031003
if d.IsNewResource() || d.HasChange("vulnerability_alerts") {
1004-
if v, ok := d.GetOkExists("vulnerability_alerts"); ok { //nolint:staticcheck,SA1019 // We sometimes need to use GetOkExists for booleans
1004+
if v, ok := d.GetOkExists("vulnerability_alerts"); ok { //nolint:staticcheck //SA1019 // We sometimes need to use GetOkExists for booleans
10051005
if val, ok := v.(bool); ok {
10061006
err := updateVulnerabilityAlerts(ctx, client, owner, repoName, val)
10071007
if err != nil {

0 commit comments

Comments
 (0)