Description
Description
shellcheck
is a fast, static analysis tool for shell scripts. It's good at
flagging up unused variables, unintentional glob expansions, and other potential
execution and security headaches that arise from the wonders of bash
(and other shlangs).
Any shell script that is running in CI in a RAPIDS repo should be passing shellcheck
.
Benefits of this work
- Fewer chances for shell-scripts to go sideways, or for shell scripts that
complete to be conflated with shell scripts that have executed correctly. - Reduction in manual review for the build team of new shell scripts or updated
shell scripts in PRs, automating "linty" PR suggestions.
Notes
For the initial scope, I propose that we only run shellcheck
on scripts in the
ci/
directory, or on any scripts that are called in GHA.
There are some repos with a lot of shell-scripts more related to local
build-process, and these are less critical to "get right" (although that can be
done incrementally in the future).
Further, making several small tweaks to existing local build scripts across
these packages may break things in subtle ways, so it's better to have buy-in
from project maintainers before delving too deeply beyond ci/
Acceptance Criteria
shellcheck
is run in CI against theci/
directory in all RAPIDS repos that have shell scripts- All shell scripts in-scope pass
shellcheck
or have explicit (individual)
exceptions noted. (No blanket exemptions)
Approach
These repos can be updated in any order, since these updates are all self-contained.
The goal is to have each repo running shellcheck
in GHA, similar to https://github.com/rapidsai/gha-tools/blob/main/.github/workflows/prs.yaml#L20-L24