Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test of laguage name. #1026

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

glazari
Copy link

@glazari glazari commented Aug 14, 2023

The current generated tests from the data folder check for the report values but not if the the correct laguage was identified. The problem here is if the wrong language is identified but by luck the counts match, the tests wont catch that.

Example:

lets say we have a zsh.zsh file that tokei thinks is a bash script. Given how simillar they are, the counts will likely be correct even if the extesion is misenturpreted, but the report produced by tokei will put the counts under the wrong laguage lable.

A more tricky example is that of ruby_env which relys on the shebang and the /usr/bin/env ruby which is less obvious then some other forms html

This test was suggested as a followup of this other PR:
#1025

The current generated tests from the data folder check for the
report values but not if the the correct laguage was identified.
The problem here is if the wrong language is identified but by luck
the counts match, the tests wont catch that.

Example:

lets say we have a zsh.zsh file that tokei thinks is a bash script.
Given how simillar they are, the counts will likely be correct even
if the extesion is misenturpreted, but the report produced by tokei
will put the counts under the wrong laguage lable.

A more tricky example is that of ruby_env which relys on the shebang
and the `/usr/bin/env ruby` which is less obvious then some other forms
html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant