Shell scripts are similar to magic: difficult for the uninitiated to read, require care to write, and can result in cursing. Voltron has ~2000 lines of them. shellcheck is a linter which helps point out places where shell scripts might break, such as unexpected splitting of a variable or cding into a nonexistant directory. shellcheck could be used in CI and in most major IDEs during development.
Affected Version
the develop branch as of 2020-06-10.
Steps to Reproduce
# in a debian-based system; *nixes and windows also supported.
apt-get install shellcheck; shellcheck +x ./**/*.sh
Additional Details
suggested actions:
address the existing shellcheck issues.
add a script running shellcheck and run the script during CI.
document using shellcheck for contributors
If I get the go-ahead from the volttron team, I'd be happy to PR these changes.
@SKalt Please go for it...
Though I would not do it on all of the scripts. I think some of the scripts need to be trimmed as we are doing somethings different(better?) in other places.
Description of Issue
Shell scripts are similar to magic: difficult for the uninitiated to read, require care to write, and can result in cursing. Voltron has ~2000 lines of them.
shellcheck
is a linter which helps point out places where shell scripts might break, such as unexpected splitting of a variable orcd
ing into a nonexistant directory.shellcheck
could be used in CI and in most major IDEs during development.Affected Version
the develop branch as of 2020-06-10.
Steps to Reproduce
Additional Details
suggested actions:
If I get the go-ahead from the volttron team, I'd be happy to PR these changes.