elastic / cloudbeat

Analyzing Cloud Security Posture
Other
14 stars 42 forks source link

Lint `deploy/` shell scripts with shellcheck #1364

Open orestisfl opened 1 year ago

orestisfl commented 1 year ago

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

Related tasks/epics Shellcheck introduced in https://github.com/elastic/cloudbeat/pull/1357

oren-zohar commented 1 year ago

Closed by: https://github.com/elastic/cloudbeat/pull/1534

orestisfl commented 1 year ago

Not all scripts are linted yet, re-opening

romulets commented 12 months ago
romulets commented 12 months ago

It will be covered by https://github.com/elastic/cloudbeat/pull/1568