[LEDE-DEV] Automated shell code debugging

Jan-Tarek Butt tarek at ring0.de
Tue Oct 4 14:50:56 PDT 2016

On 10/02/16 18:10, Bastian Bittorf wrote:
> * Jan-Tarek Butt <tarek at ring0.de> [02.10.2016 17:48]:
>> As a part of code quallity enhancemend and prevenition. We can do an ondemand daemon as engine to
>> check all shell scrips. We can use the opensource Project shellcheck [0].
>> My idea is to do an insatnce on a server:
>> This insatnce can pull the lede repo daily and run some thing like:
>> find . -type f -name "*.sh" | xargs shellcheck
>> if something news pulled and shellcheck detecs some misstating we can send via bsd-mailx
>> on our ML the shellceck output.
>> Sould I build something for that?
> it's not *that* easy. for now the shell-codebase has *thousands* of
> errors. we need something that checks small parts (e.g. functions)
> and compares the error-count before and after. the output of this
> approach should maybe be included in the commit-message.
> also we must "mute" some "errors", e.g. the usage of 
> 'local' in functions, which is not POSIX (but is in the
> process of inclusion)

shellcheck is able to do that.

for mutin just add the comment

# shellcheck disable=<error präfix>

@Lars: please could you setup a shellcheck instance just for testing first? :)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20161004/7c9e4b03/attachment.sig>

More information about the Lede-dev mailing list