[PATCH 0/4] configure: fix some shellcheck warnings

Tomi Ollila tomi.ollila at iki.fi
Wed Apr 27 11:14:12 PDT 2016


On Wed, Apr 13 2016, Jani Nikula <jani at nikula.org> wrote:

> TIL about shellcheck [1]. Played with it a bit. Seems useful.
>
> $ shellcheck --exclude 2086 --shell sh configure
>
> BR,
> Jani.
>
> [1] http://www.shellcheck.net/
>
>
> Jani Nikula (4):

This series looks tolerable to me, with a slight change in first commit msg:

>   configure: SC2006: Use $(..) instead of deprecated `..`

This is what older shellcheck outputs, but newer has fixed this to be

   configure: SC2006: Use $(..) instead of legacy `..`

When testing in http://www.shellcheck.net/

Line 1:
foo=`echo x`
^-- SC2034: foo appears unused. Verify it or export it.
    ^-- SC2006: Use $(..) instead of legacy `..`.
    ^-- SC2116: Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd
    foo'.

This is the shellcheck commit (s/deprecated/legacy/ for backtick warnings.):

https://github.com/koalaman/shellcheck/commit/895d83afc5f4dec7dc9813a2688c45b96d6f7b7c

based on these I suggest commit message amend before pushing (?)

Tomi


>   configure: SC2059: Don't use variables in the printf format string.
>   configure: SC2034: glib_cflags and glib_ldflags appear unused.
>   configure: SC2016: Expressions don't expand in single quotes
>
>  configure | 25 +++++++++++++------------
>  1 file changed, 13 insertions(+), 12 deletions(-)
>
> -- 
> 2.1.4


More information about the notmuch mailing list