referral icon indicating copy to clipboard operation
referral copied to clipboard

Allow ignoring files

Open searls opened this issue 6 years ago • 2 comments

Since the catchall final argument to referral is one or more paths (i.e. via shell expansion), then when it comes to ignoring files, I think we need to get creative.

Should that mean accepting multiple --ignore option values? Accepting a quoted string that may have a glob pattern in it that is then expanded via referral and not the shell (e.g. --ignore "**/*_test.rb" to be passed as Dir["**/*_test.rb"] or some such)?

Or should we just forego an option altogether since it'll never be perfect and just have a .referralignore dot file that it'll read in a .gitignorey way. That's what other search tools like ripgrep do (with .rgignore)

cc/ @davemo, since this is one way you might work around codebases that have a few listings that are literally unparseable under 2.6+

searls avatar Jul 29 '19 20:07 searls

My vote is for the latter, a dotfile for ignores seems to pave the cowpaths from .gitignore and the like and also gives some DX parity with standardrb's use of .standard.yml

davemo avatar Jul 29 '19 20:07 davemo

Agree

searls avatar Jul 30 '19 01:07 searls