Skip to content

pre-commit-excludes: Add 2nd binary for restricting-excludes #182

Description

@hofbi

Now that we have #150, it would be nice to have a 2nd tool like restrict-excludes which

  1. finds all folder paths in the exclude list
  2. checks the folder content and expands the exclude from the single folder into all subfolders and files if the number of files directly in that folder is below a certain threshold (we want to avoid expanding folders with a lot of files)

This being executed before the tool form #150 could help to convert an exclude list like

root/child
root/child_with_many_files

into

root/child/a
root/child/b
root/child/c
root/child/foo.txt
root/child/README.md
root/child_with_many_files  # this is kept the same as it had more than --max-files so we don't want to expand that so that the exlcude list does not grow too much

Running #150 then might find some more unnecessary excludes to remove.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions