beyondgrep / ack2

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

Should tags file be searched? #403

Closed dionyziz closed 10 years ago

dionyziz commented 10 years ago

Ctag files in the project root (a file called tags) is searched when using ack. Is this desired behavior? Usually when searching in source code we're not interested in this.

petdance commented 10 years ago

That's something that you'll probably want to put in a project-level .ackrc file. For instance, at work I have:

# Known cruft
--ignore-file=ext:log
--ignore-file=ext:pdf
--ignore-file=ext:dat
--ignore-file=is:Tags

You could also use the --known-types flag that only checks for files of types that ack can identify. This was the behavior of ack 1.x.

worldmind commented 5 years ago

Why ack did not ignore TAGS file by default? Documentation says that ack it is grep for programmers and as I understood it's mean that ack has good default setting for developers?

petdance commented 5 years ago

I decided against it because it's entirely likely that folks could have a "tags" file somewhere in their tree that is not related to ctags. Putting it in your project's .ackrc works fine.

worldmind commented 5 years ago

Sorry, i think about uppercase TAGS file, but after some thinking I undestood that it will not work on MS Windows systems.