Add shellcheck for shell script linting
What does this MR do?
- Adds
shellcheckto the local dev tools (managed by Mise).- Note:
shellcheckis already present in therunner-lintersimage used in CI.
- Note:
- Adds the Make target
lint-shellto lint shell scripts. - Adds the Make target
lint-shell-reportto lint shell scripts and generate a Code Climate report. - Adds the
shell:lintjob, which runslint-shell-reportin 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-shelllocally. - Check the relevant CI job:
shell:lintin theqastage.
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