Skip to content

Commit e44552e

Browse files
committed
Fix notes.go so that it still complies with forbidigo
Signed-off-by: peppi-lotta <[email protected]>
1 parent c8a6082 commit e44552e

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

.golangci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ issues:
179179
- stylecheck
180180
text: "ST1016: methods on the same type should have the same receiver name"
181181
path: .*(api|types)\/.*\/conversion.*\.go$
182+
- path: notes\.go
183+
linters:
184+
- forbidigo
185+
text: use of `fmt.Printf` forbidden by pattern || use of `fmt.Prinln` forbidden by pattern
182186
include:
183187
- EXC0002 # include "missing comments" issues from golangci-lint
184188
max-issues-per-linter: 0

hack/tools/release/notes.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -226,43 +226,43 @@ func run() int {
226226
merges[superseded] = append(merges[superseded], "- `<insert superseded bumps and reverts here>`")
227227
}
228228

229-
log.Println("<!-- markdownlint-disable no-inline-html line-length -->")
229+
fmt.Println("<!-- markdownlint-disable no-inline-html line-length -->")
230230
// TODO Turn this into a link (requires knowing the project name + organization)
231-
log.Printf("# Changes since %v\n\n", lastTag)
231+
fmt.Printf("# Changes since %v\n\n", lastTag)
232232

233233
// print the changes by category
234234
for _, key := range outputOrder {
235235
mergeslice := merges[key]
236236
if len(mergeslice) > 0 {
237-
log.Printf("## %v\n\n", key)
237+
fmt.Printf("## %v\n\n", key)
238238
for _, merge := range mergeslice {
239-
log.Println(merge)
239+
fmt.Println(merge)
240240
}
241-
log.Println()
241+
fmt.Println()
242242
}
243243

244244
// if we're doing beta/rc, print breaking changes and hide the rest of the changes
245245
if key == warning {
246246
if isBeta(latestTag) {
247-
log.Printf(warningTemplate, "BETA RELEASE")
247+
fmt.Printf(warningTemplate, "BETA RELEASE")
248248
}
249249
if isRC(latestTag) {
250-
log.Printf(warningTemplate, "RELEASE CANDIDATE")
250+
fmt.Printf(warningTemplate, "RELEASE CANDIDATE")
251251
}
252252
if isBeta(latestTag) || isRC(latestTag) {
253-
log.Printf("<details>\n")
254-
log.Printf("<summary>More details about the release</summary>\n\n")
253+
fmt.Printf("<details>\n")
254+
fmt.Printf("<summary>More details about the release</summary>\n\n")
255255
}
256256
}
257257
}
258258

259259
// then close the details if we had it open
260260
if isBeta(latestTag) || isRC(latestTag) {
261-
log.Printf("</details>\n\n")
261+
fmt.Printf("</details>\n\n")
262262
}
263263

264-
log.Printf("The container image for this release is: %v\n", latestTag)
265-
log.Println("\n_Thanks to all our contributors!_ 😊")
264+
fmt.Printf("The container image for this release is: %v\n", latestTag)
265+
fmt.Println("\n_Thanks to all our contributors!_ 😊")
266266

267267
return 0
268268
}

0 commit comments

Comments
 (0)