-
Notifications
You must be signed in to change notification settings - Fork 199
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
#2575
Conversation
|
||
cd "${package_dir}" | ||
|
||
rapids-logger "validate packages with 'pydistcheck'" | ||
|
||
pydistcheck \ | ||
--inspect \ | ||
"$(echo ${wheel_dir_relative_path}/*.whl)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously package_name
was unused in this script
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is why https://github.com/rapidsai/raft/actions/runs/13188022880/job/36815130064?pr=2575 is failing like this:
Usage: pydistcheck [OPTIONS] [FILEPATHS]...
Try 'pydistcheck --help' for help.
Error: Invalid value for '[FILEPATHS]...': Path 'final_dist/raft-dask*.whl' does not exist.
package_name
here is raft-dask
(with a -
), but the wheel filename begins with raft_dask
(with a _
). That's intentional behavior.
I think a better fix here would be to just remove package_name
from the script (and the corresponding calls to it).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, stripped out package_name
. thanks for tracking that down, @jameslamb !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No prob! It's my fault that package_name
was left behind there unused in anyway 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left on requested change on validate_wheel.sh
.
|
||
cd "${package_dir}" | ||
|
||
rapids-logger "validate packages with 'pydistcheck'" | ||
|
||
pydistcheck \ | ||
--inspect \ | ||
"$(echo ${wheel_dir_relative_path}/*.whl)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is why https://github.com/rapidsai/raft/actions/runs/13188022880/job/36815130064?pr=2575 is failing like this:
Usage: pydistcheck [OPTIONS] [FILEPATHS]...
Try 'pydistcheck --help' for help.
Error: Invalid value for '[FILEPATHS]...': Path 'final_dist/raft-dask*.whl' does not exist.
package_name
here is raft-dask
(with a -
), but the wheel filename begins with raft_dask
(with a _
). That's intentional behavior.
I think a better fix here would be to just remove package_name
from the script (and the corresponding calls to it).
/merge |
shellcheck
is a fast, static analysis tool for shell scripts. It's good atflagging up unused variables, unintentional glob expansions, and other potential
execution and security headaches that arise from the wonders of
bash
(andother shlangs).
This PR adds a
pre-commit
hook to runshellcheck
on all of thesh-lang
files in the
ci/
directory, and the changes requested byshellcheck
to makethe existing files pass the check.
xref: rapidsai/build-planning#135