microsoft / LightGBM

A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks.
https://lightgbm.readthedocs.io/en/latest/
MIT License
16.32k stars 3.8k forks source link

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

Open Kunal-Singh-Dadhwal opened 1 week ago

Kunal-Singh-Dadhwal commented 1 week ago

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}/*"