Commit edeca76
authored
Reject use of fmt.Printf under cmd/ (#3570)
## Changes
Reject directly writing to global stdout/stderr.
The "forbidigo" linter includes this rule by default.
Also see https://golangci-lint.run/docs/linters/configuration/#forbidigo
## Why
The CLI uses Cobra and should therefore use `cmd.OutOrStdout()` and
friends.
Saw this here:
#3546 (comment)1 parent 207b511 commit edeca76
2 files changed
+15
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
| |||
185 | 190 | | |
186 | 191 | | |
187 | 192 | | |
188 | | - | |
| 193 | + | |
189 | 194 | | |
190 | 195 | | |
191 | 196 | | |
| |||
229 | 234 | | |
230 | 235 | | |
231 | 236 | | |
232 | | - | |
| 237 | + | |
233 | 238 | | |
234 | 239 | | |
235 | 240 | | |
| |||
462 | 467 | | |
463 | 468 | | |
464 | 469 | | |
465 | | - | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
466 | 474 | | |
467 | 475 | | |
468 | 476 | | |
| |||
0 commit comments