Commit 097fb05
Don't run checkers just for their reports when all messages are disabled (#10878)
Previously, prepare_checkers() would include a checker if any of its
reports were enabled, even when all its messages were disabled. This
meant checkers like `similarities` would still run their expensive
computations (e.g. O(n²) duplicate-code detection) just to populate
a report the user didn't ask for.
Now, enabled reports only cause a checker to be included if it defines
no messages at all (i.e. pure report-only checkers like RawMetrics).
Closes #3443
Co-authored-by: Claude Opus 4.6 <[email protected]>1 parent 5429be1 commit 097fb05
3 files changed
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
620 | | - | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
621 | 624 | | |
622 | 625 | | |
623 | 626 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
448 | 462 | | |
449 | 463 | | |
450 | 464 | | |
| |||
0 commit comments