Open JohannesWiesner opened 2 weeks ago
This logic was already implemented in the past:
We can split up each filepath into its path components (break on os.sep
). We can also split up the user input into it's path components. We can then check if the filepath contains a chain of path components that match the input path components.
Example:
I only want files that include
pre/standard_direct
in their filepath but I want to drop files that containpre/standard
.Because the string
pre/standard_direct
containspre/standard
it's hard to work with exact string matches. If I tell nisupply to exclude all strings that includepre/standard
, I would also excludepre/standard_direct
.This would be basically an extension to the
exclude_dirs
argument (maybeexclude_nested_dirs
would be a good name for this argument?)