Re: [PATCH/RFC v2 1/1] test-lint: Only use only sed [-n] [-e command] [-f command_file]
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jan 22, 2019, 21:15 UTC
- Message-ID
- <CAPig+cSDnhvVCDE15koO9M1A8TBg+Mbn2OBsfXVvshmRyybApw@mail.gmail.com>
- In-Reply-To
- <799c5063-b0a7-df6b-6f86-a92b8b6d679b@web.de>
On Tue, Jan 22, 2019 at 3:00 PM Torsten Bögershausen <tboegi@web.de> wrote:
Show 11 quoted lines
> On 22.01.19 20:47, Junio C Hamano wrote: > > tboegi@web.de writes: > >> - /\bsed\s+-i/ and err 'sed -i is not portable'; > >> + /\bsed\s+-[^efn]\s+/ and err 'Not portable option with sed (use only [-n] [-e command] [-f command_file])'; > > > > "sed -n -i -E -e 's/foo/bar/p'" won't be caught with this as an > > error, but that's OK ;-). > > Is this still an RFC patch? > > It seems as if everybody is happy with it, > so it may be ready for for pu.
I'd still prefer to see a more terse[1] (and not capitalized) message to be consistent with existing error messages and to keep the reported errors more compact overall to make them easier to digest[2,3]:
err 'sed option not portable (use only -n, -e, -f)'
But that's just a very minor nit.
[1]: http://public-inbox.org/git/CAPig+cSeDNYFGYC2WznjW3zYMJCWZbZFY1KM5H5ir2L=Jxwy7w@mail.gmail.com/ [2]: http://public-inbox.org/git/20180713055205.32351-3-sunshine@sunshineco.com/ [3]: http://public-inbox.org/git/20180713055205.32351-4-sunshine@sunshineco.com/