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

is it possible to run kondo recursively? #51

Closed
lucascr91 opened this issue Dec 18, 2021 · 3 comments
Closed

is it possible to run kondo recursively? #51

lucascr91 opened this issue Dec 18, 2021 · 3 comments

Comments

@lucascr91
Copy link

I would like to run kondo in all directories below a directory (say dir). Is there something like kondo -r dir?

@tbillington
Copy link
Owner

Kondo is recursive by default :) It uses https://github.com/BurntSushi/walkdir internally.

If you've found a case where it isn't it could be a bug, do you have more information?

@lucascr91
Copy link
Author

Kondo is recursive by default :)

Cool. I didn't realize that at first because running it just deleted one folder at the top level, so I assume it's not recursive. Thank you for the clarification!

@tbillington
Copy link
Owner

There is a limitation currently where children of a directory that is identified as a project won't be searched. #29

kondo/kondo-lib/src/lib.rs

Lines 244 to 245 in 963e12f

if let Some(project_type) = p_type {
self.it.skip_current_dir();

The original reason for it was tools like npm nest projects within projects. So kondo would detect the top level project, then return another thousand results of all of it's dependencies inside node_modules. It's definitely possible to be smarter about this, I just haven't spent the time to handle the case properly :)

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