beyondgrep / ack2

**ack 2 is no longer being maintained. ack 3 is the latest version.**
https://github.com/beyondgrep/ack3/
Other
1.48k stars 138 forks source link

Weird behaviour not ignoring files and searching non-files? #675

Closed ryanmortier closed 5 years ago

ryanmortier commented 5 years ago

image

image

image

image

image

ack seems to be ignoring my ignored files but that isn't the worst part. The worst part is it keeps finding things in these weird non-files called path, confirmation_, confirmation_path, etc.

ryanmortier commented 5 years ago

Solved. Yikes, actually the issue was pretty simple.

Turns out I had issued an ack ->confirmation_path command earlier (working with PHP objects) and trying to find string literal ->confirmation_path.

Unknowingly this had dumped acks output to a file named confirmation_path including the composer.lock content.

Stupid mistake.

petdance commented 5 years ago

Glad you found it. I've done that more than a few times myself. I try to have the habit of looking for -.method_name. Theoretically it could match -Xmethod_name, but I use it for safety if I'm just snooping around a codebase.