XAMPPRocky / tokei

Count your code, quickly.
Other
10.51k stars 504 forks source link

Hare & Headache conflict #1090

Closed SandaruKasa closed 1 month ago

SandaruKasa commented 1 month ago

971 introduced hare language without adding any tests for it.

There was an existing test for the Headache language, which uses the same .ha extension as Hare. After #971 this Headache file get detected as Hare, and since Hare (unlike Headache) doesn't have multiline comments, the counts are wrong. (This could've been caught by CI if it was run on PRs).

There seem to be a mechanism in-place in tests to detect such conflicts, but it doesn't fire here, because it checks that the list of languages has exactly 1 item. However in this case, it does indeed have 1 item for some reason instead of 2. And this one item happens to be a wrong one.