Repository navigation
Commit 41eb8cd
authored
feat: render a warned rule as a warning, not a failure (#276)
commit-check's CLI reports a rule listed under the config's top-level
warn as status "warn" rather than "fail" (commit-check#565). The
action's report follows: a warned scope gets its own row in the
Warnings table (alongside the existing Failed checks table), its own
⚠ line in the step log and details block, and a ::warning annotation
instead of ::error — but it never turns the workflow red. It counts
toward "passed" in the verdict instead, e.g. "3 of 4 checks passed,
1 warning".
A real failure still fails the run even when a warning sits in the
same scope (CC202 stands in for branch when the two disagree), and the
verdict then names both: "N of M checks failed, K warnings".
ScopeResult.status and .warnings, overall_status/exit_code_for (warn
already fell through to "pass", now documented), _render_scopes,
render_step_log's annotations, and render_report/_markdown_table all
follow. Against an older engine, or a config with no warn list, no
check can ever be a warning, and every existing golden-output test
keeps passing unchanged.1 parent 1893d04 commit 41eb8cd
3 files changed
Lines changed: 367 additions & 55 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
206 | 213 | | |
207 | 214 | | |
208 | 215 | | |
| |||
338 | 345 | | |
339 | 346 | | |
340 | 347 | | |
| 348 | + | |
| 349 | + | |
| 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 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
341 | 391 | | |
342 | 392 | | |
343 | 393 | | |
| |||
0 commit comments