Commit eec4989
committed
Ban use of print macros in non-test code
With f472bce (Ignore EPIPE in CLI (#746), 2024-07-17) we added the
`_nopipe` variants of the `(e)print(ln)!` macros to avoid panicking when
piping to head(1). However, we do not systematically enforce their use,
which will inevitably lead inconsistent usage within the project.
Add `clippy` lints to ban use of the print macros in all non-test code.
Either the `_nopipe` variants should be used when we don't care if the
input is read, or `write!` when the information is crucial, such as an
interactive session.1 parent f472bce commit eec4989
3 files changed
+24
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
238 | | - | |
| 239 | + | |
239 | 240 | | |
240 | | - | |
| 241 | + | |
241 | 242 | | |
242 | 243 | | |
243 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
244 | 249 | | |
245 | 250 | | |
246 | 251 | | |
| |||
348 | 353 | | |
349 | 354 | | |
350 | 355 | | |
351 | | - | |
352 | | - | |
353 | | - | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
354 | 359 | | |
355 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
356 | 365 | | |
357 | | - | |
| 366 | + | |
358 | 367 | | |
359 | 368 | | |
360 | 369 | | |
| |||
386 | 395 | | |
387 | 396 | | |
388 | 397 | | |
389 | | - | |
| 398 | + | |
390 | 399 | | |
391 | 400 | | |
392 | 401 | | |
| |||
408 | 417 | | |
409 | 418 | | |
410 | 419 | | |
411 | | - | |
| 420 | + | |
| 421 | + | |
412 | 422 | | |
413 | 423 | | |
414 | | - | |
| 424 | + | |
415 | 425 | | |
416 | 426 | | |
417 | 427 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
199 | | - | |
| 200 | + | |
200 | 201 | | |
201 | 202 | | |
202 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
0 commit comments