cloudbeat
cloudbeat copied to clipboard
Lint `deploy/` shell scripts with shellcheck
Motivation Shellcheck is a very popular shell script linter, its usage is recommended as a best practice when developing shell scripts.
Expand the shellcheck linter usage to other scripts in our repo, especially the ones that are used by users, like deploy.sh.
For example, one potential problem I see in that script is that the set -e
option is not set which means that the script will continue even when commands start failing. But, enabling that option is not enough because we are affected by rule SC2155 in our variable exports.
Definition of done What needs to be completed at the end of this task
- [ ] Expand pre-commit file regex to include more files
- [ ] Evaluate and fix or ignore failures
Related tasks/epics Shellcheck introduced in https://github.com/elastic/cloudbeat/pull/1357
Closed by: https://github.com/elastic/cloudbeat/pull/1534
Not all scripts are linted yet, re-opening
- [ ] Include
deploy/deployment-manager/
scripts as well
It will be covered by https://github.com/elastic/cloudbeat/pull/1568