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

Does not recurse through directories with python scripts present #117

Open
rivnakm opened this issue Dec 21, 2023 · 3 comments
Open

Does not recurse through directories with python scripts present #117

rivnakm opened this issue Dec 21, 2023 · 3 comments

Comments

@rivnakm
Copy link
Contributor

rivnakm commented Dec 21, 2023

I have a project where I use python to script some misc tasks like testing. It seems that once a .py file is detected it'll stop searching any other subdirectories since it marks the project as Python. This might have to get filed under the discovery rework since it might need project types to be non-exclusive which could take some extra refactoring.

Example: since the project root has a run.py file, the cargo and nodejs projects aren't detected

project/
├── api/
│   ├── src/
│   ├── target/
│   ├── tests/
│   ├── Cargo.toml
│   └── test.py
├── web/
│   ├── node_modules/
│   ├── src/
│   └── package.json
└── run.py
@tbillington
Copy link
Owner

You're correct that resolving this falls under the rework described in #111 and is an example of #29.

It does poke at an issue that I've been struggling to come up with a solid answer for.

Given the nested project structure you've described, would you expect/prefer that kondo treat project/ as a singular project, or as 3 separate projects?

@rivnakm
Copy link
Contributor Author

rivnakm commented Dec 21, 2023

I think I'd prefer it to be detected as one project of multiple types (so a single delete prompt). But how do we determine that the subfolders are part of a single project? I'd imagine checking for a .git folder is a good option there.

@tbillington
Copy link
Owner

I hadn't thought of .git but it is a strong indicator.

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