Closed mandeep closed 7 years ago
It detects refs/remotes/origin/master
as ASP.NET which is quite unexpected :)
Looks like "master" is an ASP.NET extension, and so is sitemap? Strange. When there's no extensions I just pretend the filename is an extension, which handles "Makefile" nicely. Not working out so cleanly in this case. Maybe I'll only do that in case of makefiles and just treat anything else without an extension as unrecognized? I'll have to think about it more.
I would simply add a flag to include 'hidden' files and folders (starting with a dot) and exclude them by default.
Fair point, the problem generalizes to any file without an extension, but .git/ is probably the biggest offender.
Here's a workaround, invoke it like this: loc $(git ls-files)
@mandeep @defnull: switched to using the same ignore crate and flags ripgrep uses (https://github.com/cgag/loc/commit/c8b20c9ec58d92026171f883ae103023d4298609)
-u to stop using .gitignore, -uu to also include hidden files/dirs.
First, I want to say that I'm really impressed with the speed of loc! Now on to the issue:
I noticed that when I run "loc ." in the project root that the directory's git directory is included in the results. I propose either disabling git directories or disabling hidden directories from the results. Thoughts?