git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Schuberth <sschuberth@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	Nguyen Thai Ngoc Duy <pclouds@gmail.com>,
	git@vger.kernel.org
Subject: Re: [RFC] Add basic syntax check on shell scripts
Date: Wed, 05 Dec 2012 10:11:41 +0100	[thread overview]
Message-ID: <50BF0FCD.6080700@gmail.com> (raw)
In-Reply-To: <7vobi9mwt4.fsf@alter.siamese.dyndns.org>

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

      parent reply	other threads:[~2012-12-05  9:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-02 13:17 [RFC] Add basic syntax check on shell scripts Torsten Bögershausen
2012-12-02 14:30 ` Stefano Lattarini
2012-12-03 16:56 ` Junio C Hamano
2012-12-04  7:20   ` Nguyen Thai Ngoc Duy
2012-12-04 19:39     ` Junio C Hamano
2012-12-05  5:43       ` Nguyen Thai Ngoc Duy
2012-12-05  6:02         ` Junio C Hamano
2012-12-05  7:30         ` Jeff King
2012-12-05  7:54           ` Jeff King
2012-12-05 16:12             ` Junio C Hamano
2012-12-05  9:11       ` Sebastian Schuberth [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50BF0FCD.6080700@gmail.com \
    --to=sschuberth@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).