your-tools / ruplacer

Find and replace text in source files
BSD 3-Clause "New" or "Revised" License
426 stars 25 forks source link

Feature request: filter files by regexp #56

Closed s-d-m closed 3 years ago

s-d-m commented 3 years ago

Currently ruplacer provides a -t option to let work only on a file type, like c++, java, gradle ... It would be nice if the user could provide a regexp to match against specific files and only check those.

dmerejkowsky commented 3 years ago

Why not :)

the WalkBuilder struct from the ignore crrate we use has a filter_entry method we could use for this purpose, along with a --file-regex flag or something.