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

Glob path with * as input #871

Open
realmofevil opened this issue Jan 1, 2022 · 1 comment
Open

Glob path with * as input #871

realmofevil opened this issue Jan 1, 2022 · 1 comment

Comments

@realmofevil
Copy link

realmofevil commented Jan 1, 2022

Hello, I was comparing features between https://github.com/XAMPPRocky/tokei/ and https://github.com/AlDanial/cloc
I find they have minor count differences in the results but tokei seems to be much faster and works great, so I like it better.
But there is one difference in functionality that cloc has and is very important for my use case, maybe for others as well.

Directory structure example:

\Project\Content
├───Name1
│   ├───Code
│   │   └───ClassDefs
│   └───Presets
│       ├───Preset
│       ├───Other
│       └───Templates
├───Name2
│   ├───Code
│   ├───Presets
│   │   ├───Config
│   │   └───Templates
│   └───etc
*

In cloc you can count only the code in all sub-directories that have the folder Code in the end path:

cloc Project/Content/*/Code

This doesn't seem to be possible with tokei at the moment or I have no idea how to achieve it. Currently you have to go and list by hand every dir or achieve it by additional scripting which is not ideal.

Note: Part of my real problem is that all files in the other sub-directories like Presets, etc. are with source file extensions e.g., ".lua" in my case but they actually don't contain any actual code logic, so I want to filter only the results from the Code dirs.

@svercl
Copy link
Contributor

svercl commented Jan 3, 2022

I think this could be achieved by using globs for the input paths

@realmofevil realmofevil changed the title Recursive path with * as input Glob path with * as input Jan 6, 2022
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

2 participants