Commit 3d53da1
committed
run-clang-tidy-cached: surface fatal clang-tidy errors instead of caching empty output
Previously, when clang-tidy exited non-zero without producing any check
findings (e.g. bad config, missing compile db, unknown check), stderr was
discarded via `2>/dev/null` and an empty output file was cached as if the
file had no findings. Subsequent runs would hit the cache and never notice.
Redirect stderr into the output, detect non-zero exits with no findings as
fatal, stop other worker threads via an atomic flag, and print the captured
output before aborting the run.
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>1 parent ae0cf47 commit 3d53da1
1 file changed
Lines changed: 40 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
311 | 316 | | |
312 | 317 | | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
313 | 321 | | |
314 | 322 | | |
315 | 323 | | |
| |||
328 | 336 | | |
329 | 337 | | |
330 | 338 | | |
331 | | - | |
| 339 | + | |
332 | 340 | | |
333 | 341 | | |
334 | 342 | | |
| |||
340 | 348 | | |
341 | 349 | | |
342 | 350 | | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
343 | 376 | | |
344 | 377 | | |
345 | 378 | | |
| |||
356 | 389 | | |
357 | 390 | | |
358 | 391 | | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
359 | 398 | | |
360 | 399 | | |
361 | 400 | | |
| |||
0 commit comments