[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/7] tests: migrate tests/sh.test checks to syntax-checks.
From: |
Gary V. Vaughan |
Subject: |
Re: [PATCH 3/7] tests: migrate tests/sh.test checks to syntax-checks. |
Date: |
Tue, 22 Nov 2011 12:16:41 +0700 |
Hi Stefano,
On 22 Nov 2011, at 02:52, Stefano Lattarini wrote:
> Hi Gary. Just a quick nit (I haven't looked at the whole
> series, and not even at the whole patch in fact; sorry).
No apologies necessary, every little helps! Thank you.
> On Monday 21 November 2011, Gary V wrote:
>> for file
>> do
>> - test -f $file || touch $file
>> + test -f "$file" || touch $file
>>
> What's the point of quoting file after `test -f' it it remains
> unquoted after `touch'?
Even though we know there is no whitespace in $file because of the
for loop, there still might be other shell meta-characters in there.
All uses of $file (including a bunch in the following lines) should
be quoted correctly, but that is another patch.
Cheers,
--
Gary V. Vaughan (gary AT gnu DOT org)
- [PATCH 1/7] syntax-check: fix violations and implement sc_useless_quotes_in_case., Gary V. Vaughan, 2011/11/21
- [PATCH 2/7] syntax-check: fix violations and implement sc_useless_quotes_in_assignment., Gary V. Vaughan, 2011/11/21
- [PATCH 7/7] syntax-check: fix violations and implement sc_prohibit_sed_s_comma., Gary V. Vaughan, 2011/11/21
- [PATCH 5/7] syntax-check: fix violations and implement sc_useless_braces_in_variable_derefs., Gary V. Vaughan, 2011/11/21
- [PATCH 6/7] syntax-check: fix violations and implement sc_prohibit_test_const_follows_var., Gary V. Vaughan, 2011/11/21