Skip to content

Add shellcheck across RAPIDS #135

Open
@gforsyth

Description

@gforsyth

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).

https://www.shellcheck.net/

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 the ci/ 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions