mufeedvh / code2prompt

A CLI tool to convert your codebase into a single LLM prompt with source tree, prompt templating, and token counting.
MIT License
2.07k stars 117 forks source link

folders called data skipped #33

Open steelep opened 2 months ago

steelep commented 2 months ago

Issue: If you have a folder called "data" in your target repo code2prompt will skip it even if it contains relevant files.

To replicate: 
> my_repo
> ├── folder_a
> │   ├── foo.py
> │   └── bar.rs
> ├── data
> │   ├── alice.py
> │   ├── bob.py
> 

Running: code2prompt /home/user_name/code/my_repo/ --include="*.py, *.rs" --output=./output.txt --tokens

Results in ./output.txt of: 
> my_repo
> ├── folder_a
> │   ├── foo.py
> │   └── bar.rs

home/user_name/code/my_repo/foo.py
....

home/user_name/code/my_repo/bar.rs
....

Where alice.py + bob.py files are missing, if I change the name of the folder to data_x or something, both formerly missing files will appear...

mufeedvh commented 2 months ago

Thank you for opening this issue @steelep. Is the "data" folder/directory in your .gitignore file by any chance?