Skip to content

[ci] resolve shellcheck errors in .ci/check_python_dists.sh - #6503

Merged
jameslamb merged 10 commits into
lightgbm-org:masterfrom
kunalsinghdadhwal:ci/shellcheck
Jul 4, 2024
Merged

jameslamb merged 10 commits into
lightgbm-org:masterfrom
kunalsinghdadhwal:ci/shellcheck

Conversation

@kunalsinghdadhwal

Copy link
Copy Markdown
Contributor

Contributing to #6498 , So in the file .ci/check_python_dists.sh the errors raise by shellcheck were

In .ci/check_python_dists.sh line 3:
set -e -E -u
       ^-- SC3041 (warning): In POSIX sh, set flag -E is undefined.

So I changes the shebang line from #!/bin/sh to #!/bin/bash

Then shellcheck was giving errors based on SC2086 i.e.

In .ci/check_python_dists.sh line 23:
    check-wheel-contents ${DIST_DIR}/*.whl || exit 1
                         ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.

The same errors were also on line 19,37,45,52 which can be resolved by changing ${DIST_DIR}/* to "${DIST_DIR}/*"

@jameslamb jameslamb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the help. Please see the first round of comments here.

Comment thread .ci/check_python_dists.sh Resolved
Comment thread .ci/check_python_dists.sh Resolved
Comment thread .ci/check_python_dists.sh Resolved

@jameslamb jameslamb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please fix the cases with wildcards.

Comment thread .ci/check_python_dists.sh Resolved
Comment thread .ci/check_python_dists.sh Resolved
Comment thread .ci/check_python_dists.sh Resolved
kunalsinghdadhwal and others added 3 commits June 28, 2024 07:53
Co-authored-by: James Lamb <jaylamb20@gmail.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
@jameslamb
jameslamb self-requested a review July 4, 2024 03:35

@jameslamb jameslamb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks for the help!

@jameslamb
jameslamb merged commit a8b7078 into lightgbm-org:master Jul 4, 2024
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically locked since there has not been any recent activity since it was closed.
To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants