hiroyuki-sato opened a new pull request, #46700:
URL: https://github.com/apache/arrow/pull/46700
### Rationale for this change
`ci/scripts/cpp_test.sh` violates two shellcheck rules.
* SC2071: `< is for string comparisons. Use -lt instead.`
* SC2086: `Double quote to prevent globbing and word splitting.`
```
./ci/scripts/cpp_test.sh
In ./ci/scripts/cpp_test.sh line 22:
if [[ $# < 2 ]]; then
^-- SC2071 (error): < is for string comparisons. Use -lt instead.
In ./ci/scripts/cpp_test.sh line 87:
pushd ${build_dir}
^----------^ SC2086 (info): Double quote to prevent globbing and word
splitting.
Did you mean:
pushd "${build_dir}"
In ./ci/scripts/cpp_test.sh line 103:
--parallel ${n_jobs} \
^-------^ SC2086 (info): Double quote to prevent globbing and
word splitting.
Did you mean:
--parallel "${n_jobs}" \
In ./ci/scripts/cpp_test.sh line 105:
--timeout ${ARROW_CTEST_TIMEOUT:-300} \
^-------------------------^ SC2086 (info): Double quote to
prevent globbing and word splitting.
Did you mean:
--timeout "${ARROW_CTEST_TIMEOUT:-300}" \
In ./ci/scripts/cpp_test.sh line 111:
examples=$(find ${binary_output_dir} -executable -name "*example")
^------------------^ SC2086 (info): Double quote to
prevent globbing and word splitting.
Did you mean:
examples=$(find "${binary_output_dir}" -executable -name "*example")
In ./ci/scripts/cpp_test.sh line 129:
${binary_output_dir}/arrow-ipc-stream-fuzz
${ARROW_TEST_DATA}/arrow-ipc-stream/crash-*
^------------------^ SC2086 (info): Double quote to prevent globbing and
word splitting.
^----------------^ SC2086
(info): Double quote to prevent globbing and word splitting.
Did you mean:
"${binary_output_dir}"/arrow-ipc-stream-fuzz
"${ARROW_TEST_DATA}"/arrow-ipc-stream/crash-*
In ./ci/scripts/cpp_test.sh line 130:
${binary_output_dir}/arrow-ipc-stream-fuzz
${ARROW_TEST_DATA}/arrow-ipc-stream/*-testcase-*
^------------------^ SC2086 (info): Double quote to prevent globbing and
word splitting.
^----------------^ SC2086
(info): Double quote to prevent globbing and word splitting.
Did you mean:
"${binary_output_dir}"/arrow-ipc-stream-fuzz
"${ARROW_TEST_DATA}"/arrow-ipc-stream/*-testcase-*
In ./ci/scripts/cpp_test.sh line 131:
${binary_output_dir}/arrow-ipc-file-fuzz
${ARROW_TEST_DATA}/arrow-ipc-file/*-testcase-*
^------------------^ SC2086 (info): Double quote to prevent globbing and
word splitting.
^----------------^ SC2086
(info): Double quote to prevent globbing and word splitting.
Did you mean:
"${binary_output_dir}"/arrow-ipc-file-fuzz
"${ARROW_TEST_DATA}"/arrow-ipc-file/*-testcase-*
In ./ci/scripts/cpp_test.sh line 132:
${binary_output_dir}/arrow-ipc-tensor-stream-fuzz
${ARROW_TEST_DATA}/arrow-ipc-tensor-stream/*-testcase-*
^------------------^ SC2086 (info): Double quote to prevent globbing and
word splitting.
^----------------^
SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
"${binary_output_dir}"/arrow-ipc-tensor-stream-fuzz
"${ARROW_TEST_DATA}"/arrow-ipc-tensor-stream/*-testcase-*
In ./ci/scripts/cpp_test.sh line 134:
${binary_output_dir}/parquet-arrow-fuzz
${ARROW_TEST_DATA}/parquet/fuzzing/*-testcase-*
^------------------^ SC2086 (info): Double quote to prevent globbing
and word splitting.
^----------------^ SC2086
(info): Double quote to prevent globbing and word splitting.
Did you mean:
"${binary_output_dir}"/parquet-arrow-fuzz
"${ARROW_TEST_DATA}"/parquet/fuzzing/*-testcase-*
For more information:
https://www.shellcheck.net/wiki/SC2071 -- < is for string comparisons. Use
...
https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing
...
```
### What changes are included in this PR?
* Use `-lt` instead of `<'
* Quote variables.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
No.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]