Subject: Re: [RFC] Add basic syntax check on shell scripts

From: Sebastian Schuberth <[email-masked]>
Date: Wed, 05 Dec 2012 10:11:41 +0100

On 2012/12/04 20:39 , Junio C Hamano wrote:

> A few more things in addition to what Torsten's script attempts to
> catch that we would want to catch are:

[...]

 >   * Do not write ERE with backslashes and expect "grep" to grok them;
 >     that's GNUism.  e.g.
 >
 > 	grep "^\(author\|committer\) "
 >
 >     is bad.  Use egrep (or "grep -E") if you want to use ERE.

Yet more thing that is probably worth catching, although not related to 
bashism: Avoid the use of "which" in favor of e.g. "type".

In any case, having this check as a local pre-commit hook would be great!

-- 
Sebastian Schuberth