Skip to content

Accept string representing regex to filter generated files without modification #64

@ctumolosus

Description

@ctumolosus

It's unclear to me which syntax the CLI wants me to use to filter files. It looks like it wants to support globs, but the implementation to turn a glob into a regular expression feels incomplete. At least, I could not find a way to exclude a single file by name. Since the patterns that can be used are poorly documented and feel limited by the implementation, I propose the file filter should accept a regular expression without substitution. In my case, this would allow me to exclude a single file using a negative lookahead ^(?!filename).*\.js$.

Basically, I'm proposing this line is changed from:

file_regex = Regexp::new("^" + filename.gsub('.', '\.').gsub('*', '[^.]*').gsub('?', '[^.]?') + "$")

to:

file_regex = Regexp::new(filename)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions