facebookincubator / fastmod

A fast partial replacement for the codemod tool
Apache License 2.0
1.66k stars 41 forks source link

--extensions can't be used to match files with no extension, like BUCK or Makefile #2

Closed swolchok closed 6 years ago

swolchok commented 6 years ago

The solution to this is probably to support -g/--glob like ripgrep, since we use the ignore crate to implement --extensions anyway and we could just implement -g with passthrough to ignore.

swolchok commented 6 years ago

While we're at it, we might as well support --iglob too.

gsquire commented 6 years ago

I can take a shot at this. Reading some of the ripgrep documentation I see that globs take precedence over other matching logic. So if the user opts for glob or iglob, it would be used instead of extensions. Do you want to copy this behavior for fastmod?

swolchok commented 6 years ago

Sounds great to me! It would probably be best to state that each of glob and iglob conflicts_with extensions.