Skip to content

Ability to whitelist only specific model patterns #289

@mbkloster

Description

@mbkloster

I am looking at rolling out this gem for models in a very large codebase (thousands of such models), and we have a number of tools in place, some locally and some in CI, that would choke at a large number of files being changed in a short time. Ideally, I’d like some way to set up an allowlist / whitelist such that we only include models that match a certain pattern, then roll the gem out more gradually.

One way that this could be accomplished out of the box would be to use a combination of --model-dir (to some dir without any actual models) and then --additional-file-patterns, but this seems rather hacky, and relies on me having a “non-functional” directory to point my model dir to.

Instead, I’d ideally like to have functionality that gives us the ability to set a specific allowlist / whitelist, then add file patterns to that, sort of like --additional-file-patterns, but acting with a “don’t include any models as a baseline” to start. This would give a lot more flexibility for teams that wish to (for whatever reason) limit the scope of this gem.

Is it possible this functionality could be included? Or perhaps is already included, but I'm missing a better way to do it. I’m happy to approach creating a PR myself if need be.

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