We are humans, and errors are bound to occur. To make sure there are no obvious/harmful errors, ScriBt is shellcheck
ed on every Push/Pull Activity, automated by TravisCI.
Thanks to this work - https://github.com/koalaman/shellcheck
That this has been made possible. :pray:
TravisCI page - https://travis-ci.org/ScriBt/ScriBt
You can check this page to know the current status of ScriBt
Status : OR
We get the Build Status to be passing before shipping it (to master).
Automation script - https://github.com/ScriBt/ScriBt-Examples/blob/master/shellcheck_new.sh
These warning flags by shellcheck
have been suppressed with the reason for each flag shown below
Any other Error/Warning flag pops up and the Build fails.
Information on these flags can be viewed in the ShellCheck Wiki, selecting the flag will open up a Wiki Page on that Flag
SC2016 - for keeping the $
literal in some commands
SC2030 - Variables used in Subshell aren’t used
SC2031 - ^^
SC2046 - In most of the cases, splitting is necessary
SC2086 - ^^ e.g. Command and its parameters are to be split
SC2119 - mah coding style ¯\_(ツ)_/¯
SC2120 - Same reason as above
Common syntax for functions
function <function_name>()
{
...
} # <function_name>
SC2153 - Variables starting with “SB” are set by shut_my_mouth
. They are not assigned the normal way
Normal Assignment : VAR="Value";
shut_my_mouth
Assignment : SB${SOMETHING} <- "Value"
SC2154 - Same reason as SC2153
SC2155 - Nothing required to do with return values
SC2034 - Variables are used in ROM.sh
NONE
SC2164 - Variables are not fetched from the user. Therefore, no fallback is required
SC1090 - Most of the files which are source
d are System Files
SC1091 - source
‘d files are system files