Closed anand-hariharan closed 7 years ago
I don't see how we could add a feature without getting extremely specific to this one case.
What I suggest is doing this:
ack -L 'this ALWAYS GENERATED file' | ack -x what_you_want_to_find
The first ack invocation gives a list of files that does NOT match this ALWAYS GENERATED file
, and then pipes them to the second invocation which, because of the -x
flag, takes that list as the list of files to use.
IDL files when compiled by Microsoft's MS-IDL compiler generate C and H files. They are typically thousands (sometimes tens of thousands) of lines long.
The only way of detecting that they are generated and not worth searching is that they have this as the THIRD line of the file:
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */
Request that ack provides a way to exclude such generated files.