Add shellcheck for shell script linting

What does this MR do?

  • Adds shellcheck to the local dev tools (managed by Mise).
    • Note: shellcheck is already present in the runner-linters image used in CI.
  • Adds the Make target lint-shell to lint shell scripts.
  • Adds the Make target lint-shell-report to lint shell scripts and generate a Code Climate report.
  • Adds the shell:lint job, which runs lint-shell-report in MR pipelines.

Why was this MR needed?

Shell scripts are not linted currently, which is a gap in our code quality enforcement.

A previous attempt was made but never merged.

What's the best way to test this MR?

  • Run mise install && make lint-shell locally.
  • Check the relevant CI job: shell:lint in the qa stage.

Existing issues flagged by shellcheck should appear. These will be fixed in a follow-up MR.

What are the relevant issue numbers?

Closes #9524 (closed)

Edited by Daniel Keenan

Merge request reports

Loading