-
-
Notifications
You must be signed in to change notification settings - Fork 832
Description
Hi,
Let's say I have the following repomix command, which both includes and excludes files:
repomix
--include "MyProject.Common/**/*,MyProject.Models/**/*,MyProject.UI/**/*"
--ignore "**/bin,**/obj,**/GeneratedFiles,**/Assets"
That is the correct syntax. However, if I amend the exclusion patterns to include trailing slashes, it does not work:
repomix
--include "MyProject.Common/**/*,MyProject.Models/**/*,MyProject.UI/**/*"
--ignore "**/bin/,**/obj/,**/GeneratedFiles/,**/Assets/"
The result of running this is that all files are still included in the folders we've marked to ignore. It is reasonable to assume that **/Assets
and **/Assets/
would mark all Assets
folders under the include paths for exclusion.
Similarly, the following command will not work either:
repomix
--include "MyProject.Common/**/*,MyProject.Models/**/*,MyProject.UI/**/*"
--ignore "**/bin/**/*,**/obj/**/*,**/GeneratedFiles/**/*,**/Assets/**/*"
This uses the same globbing pattern to attempt to exclude files as it does to include files, but no files are excluded.
This caught me out today when using the tool for the first time.
In summary, please make the following --ignore
patterns perform identically:
**/folder
**/folder/
**/folder/**/*
Incidentally, the "**/name" syntax for exclusion patterns may be problematic, as it will match both folders and files with that name. It's rare that you have files lacking extensions, of course, but it may be worth noting.
Thank you for your useful tool!