Commit 836b701
Only classify test-named functions as test nodes
mapDefTypeToNodeKind marked any declaration whose name started with the
language test prefix as a test node, so a production type TestConfig or a
function testimonialCard (prefix "test" + lowercase continuation) was
miscategorized, which then excluded it from dead-code analysis and
changed its search kind. Restrict the test check to function/method
declarations and require a word boundary after a bare-word prefix
(separator-terminated prefixes like "test_" already encode the boundary).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent b05b3af commit 836b701
2 files changed
Lines changed: 83 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
656 | 656 | | |
657 | 657 | | |
658 | 658 | | |
659 | | - | |
| 659 | + | |
| 660 | + | |
660 | 661 | | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | 662 | | |
666 | 663 | | |
667 | 664 | | |
668 | 665 | | |
669 | 666 | | |
670 | | - | |
671 | | - | |
672 | 667 | | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
673 | 671 | | |
674 | 672 | | |
675 | 673 | | |
676 | 674 | | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
677 | 701 | | |
678 | 702 | | |
679 | 703 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1681 | 1681 | | |
1682 | 1682 | | |
1683 | 1683 | | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
1684 | 1736 | | |
1685 | 1737 | | |
1686 | 1738 | | |
| |||
0 commit comments