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

cannot exclude node_modules and .git (and .meteor etc) #117

Open
andrewlorenz opened this issue Aug 9, 2019 · 1 comment
Open

cannot exclude node_modules and .git (and .meteor etc) #117

andrewlorenz opened this issue Aug 9, 2019 · 1 comment

Comments

@andrewlorenz
Copy link

npx sloc --format cli-table --format-option head --exclude "node_modules|.git|.meteor|" .

this fails, moaning about files in .meteor, which I have told it to exclude(!)

As others have said, the information provided as to how this exclusion string is being processed is very vague, and the lack of good, real-world examples really lets it down.

@andrewlorenz
Copy link
Author

after a quick test and checking out the source, it looks like this repo first gets a list of ALL files in the given folder structure - initially REGARDLESS of the exclusions - and only then applies the exclude regex. This also accounts for why it takes quite some time to count a small number of source lines when there is also a huge node_modules - it applies the regex to every file in turn ...

Unfortunately unless the code is revamped so that it walks the folder structure and applies the exclude to folder names as it goes, then its not at all suitable for node type project sources (nor those under git control, or with frameworks like meteor around them ..

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