Hi Pau,

On 9/15/18 10:07 PM, Pau Espin Pedrol wrote:> Regarding checking stuff
with shellcheck, it can be fine but it may be
> dangerous requiring fix of all warnings/errors, since some of them are
> sometimes really hard to fix. For instance doing some stuff in posix
> shell bs doing it for bash or whatever.

I've been using shellcheck a lot myself, and in my experience it is
actually feasible to require scripts having no warnings and errors. We
even have that set up as a CI test in a project.

It detects the shell from the shebang, so if one specifies #!/bin/bash,
it allows using the bash features. For warnings that are not helpful,
it's possible to add a line like the following above:

# shellcheck disable=SC2086

Regards,
Oliver

-- 
- Oliver Smith <[email protected]>            https://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschaeftsfuehrer / Managing Director: Harald Welte

Reply via email to