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

Files can get recounted #292

Open
mrcnski opened this issue Jan 18, 2019 · 0 comments
Open

Files can get recounted #292

mrcnski opened this issue Jan 18, 2019 · 0 comments

Comments

@mrcnski
Copy link

mrcnski commented Jan 18, 2019

Hi there,

If a file is passed in multiple times it will contribute to the line count each time. A simple example would be if someone accidentally writes tokei src src or tokei src .. The user sees no indication that the same files are being handled twice and gets an erroneous count. Might also be possible to multicount symlinked files (not sure if this is handled, a naive grep tells me not).

Ideally there would be some indication when this happens, but there would be a performance cost in maintaining the hash map (which is how I would handle it, though the paths would need to be normalized first), so it's a tricky one.

I'm thinking this check could be opt-in, opt-out, or just ignore it altogether, up to your discretion.

Thanks!

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

No branches or pull requests

1 participant