XAMPPRocky / tokei

Count your code, quickly.
Other
10.56k stars 507 forks source link

Add option to disable globbing when using tokei as a library #906

Open Shnatsel opened 2 years ago

Shnatsel commented 2 years ago

I am writing a Cargo subcommand for counting lines of all the dependencies of your project. I am using tokei as a library.

According to the documentation, languages.get_statistics() will treat paths as globs. But I only ever need to pass literals to tokei, and treating them as globs will lead to incorrect results. So I need to disable globbing for my tool to work correctly, but the Config struct does not seem to allow any control over globbing (as of version 12.1.2).

XAMPPRocky commented 2 years ago

Thank you for your issue! This would first require adding an option ignore::WalkBuilder as tokei doesn't perform the file operations itself.