From: Junio C Hamano Date: Sun, 27 Jan 2013 20:25:26 GMT Subject: Re: [PATCH] tests: turn on test-lint-shell-syntax by default Message-ID: <7vip6iv0eh.fsf@alter.siamese.dyndns.org> In-Reply-To: <7v4ni2y1fm.fsf@alter.siamese.dyndns.org> Junio C Hamano writes: > If we did not care about incurring runtime performance cost, we > could arrange: > ... > Then you can wrap commands whose use we want to limit, perhaps like > this, in the test framework: > ... > sed () { > ... > done > if test -z "$must_abort" > sed "$@" > fi > } Of course, aside from missing "then", this needs to use the real "sed", so this has to be if test -z "$must_abort" then command sed "$@" fi or something like that. An approach along this line may reduce both the false negatives and false positives down to an acceptable level, but I doubt the result would be efficient enough for us to tolerate the runtime penalty.