Skip to content

Conversation

@gilleswaeber
Copy link

Change the file enumeration method to only execute the glob once per dir instead of once per file. Does not change the behavior except that it will be much faster if using a dir to specify the location and glob exclude patterns that need to be evaluated over many files.

Additionally:

  • fix the type for include the include pattern which is always present since there is a default value therefore not optional
  • use a set for the files such that applying exclusion patterns is fast and the same file won't be processed twice in case the include patterns happen to include the same file multiple times

Checklist

  • Add test cases to all the changes you introduce → no behavior changes
  • Update the documentation for the changes → no behavior changes

@lyz-code
Copy link
Owner

lyz-code commented Apr 3, 2025

Thanks @gilleswaeber for the change. The code looks much cleaner.

I can't check that the code works though as the CI is not working. I know it's not your fault but I don't have time to fix it myself.

If you could make the CI pass it would be a really nice gesture for the community.

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

Successfully merging this pull request may close these issues.

2 participants