Should a file type filter like --test on the CLI override a previous --notest?
For example: Go uses the convention *_test.go for its test files. Most of the time when searching through a codebase I'm not interested in results from test files, so I have the following in my .ackrc:
--type-add=test:match:.*_test[.]go$
--type-add=test:ext:t
--notest
Today, I was interested in some results from test files, so I did ack -wi root --test, but got no results, because --notest from my ackrc was taking effect.
Is overriding --notest with a later --test functionality that ack should have? If not, should --notest and --test issue a mutually exclusive error?
i had thought Ack had the convention that any flag on commandline overrides Environment overrides Ackrc, so i think what you did should have worked and thus would be exposing a bug.
(Might need a test case that fails and a 'blame" bifurcation search?)
The --test on the command line should have overridden the --notest in the ackrc.
A --test on the command line will also a --notest preceding it on the command line.