Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shellcheck to pre-commit and fix warnings #1515

Merged
merged 3 commits into from
Jan 31, 2025

Conversation

gforsyth
Copy link
Contributor

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

This PR adds a pre-commit hook to run shellcheck on all of the sh-lang
files in the ci/ directory, and the changes requested by shellcheck to make
the existing files pass the check.

xref: rapidsai/build-planning#135

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@gforsyth gforsyth requested a review from a team as a code owner January 22, 2025 20:51
@gforsyth gforsyth requested a review from msarahan January 22, 2025 20:51
@github-actions github-actions bot added the ci label Jan 22, 2025
@gforsyth gforsyth added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jan 22, 2025
@gforsyth
Copy link
Contributor Author

Hmm, it looks like the taxi zone geojson file has disappeared from the NYC Open Data page, which is causing the NYC notebook to fail.

@gforsyth
Copy link
Contributor Author

@mroeschke
Copy link
Contributor

Hmm, it looks like the taxi zone geojson file has disappeared from the NYC Open Data page, which is causing the NYC notebook to fail.

#1517 has been merged so this PR should pass now with an update with the 25.02 branch

Copy link
Member

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with this! Love that this caught a couple of unused variables so we could simplify these scripts a bit.

Left one small cosmetic suggestion, do whatever you want with it. I don't feel that strongly.

ci/build_docs.sh Outdated Show resolved Hide resolved
@@ -13,8 +13,6 @@ export CMAKE_GENERATOR=Ninja

rapids-print-env

package_dir="python"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yesss glad shellcheck is helping us catch stuff like this!

Co-authored-by: James Lamb <jaylamb20@gmail.com>
@jameslamb
Copy link
Member

/merge

@rapids-bot rapids-bot bot merged commit bb14961 into rapidsai:branch-25.02 Jan 31, 2025
77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

4 participants