hiroyuki-sato opened a new pull request, #50552:
URL: https://github.com/apache/arrow/pull/50552

   ### Rationale for this change
   
   This is the sub issue #44748.
   
   * SC2086: Double quote to prevent globbing and word splitting.
   * SC2223: This default assignment may cause DoS due to globbing. Quote it.
   * SC2006: Use `$(...)` notation instead of legacy backticked ``...``.
   
   ```
   shellcheck ci/scripts/python_wheel_macos_build.sh
   
   In ci/scripts/python_wheel_macos_build.sh line 28:
   rm -rf ${build_dir}/build
          ^----------^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
   
   Did you mean:
   rm -rf "${build_dir}"/build
   
   
   In ci/scripts/python_wheel_macos_build.sh line 29:
   rm -rf ${build_dir}/install
          ^----------^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
   
   Did you mean:
   rm -rf "${build_dir}"/install
   
   
   In ci/scripts/python_wheel_macos_build.sh line 30:
   rm -rf ${source_dir}/python/dist
          ^-----------^ SC2086 (info): Double quote to prevent globbing and 
word splitting.
   
   Did you mean:
   rm -rf "${source_dir}"/python/dist
   
   
   In ci/scripts/python_wheel_macos_build.sh line 31:
   rm -rf ${source_dir}/python/build
          ^-----------^ SC2086 (info): Double quote to prevent globbing and 
word splitting.
   
   Did you mean:
   rm -rf "${source_dir}"/python/build
   
   
   In ci/scripts/python_wheel_macos_build.sh line 32:
   rm -rf ${source_dir}/python/pyarrow/*.so
          ^-----------^ SC2086 (info): Double quote to prevent globbing and 
word splitting.
   
   Did you mean:
   rm -rf "${source_dir}"/python/pyarrow/*.so
   
   
   In ci/scripts/python_wheel_macos_build.sh line 33:
   rm -rf ${source_dir}/python/pyarrow/*.so.*
          ^-----------^ SC2086 (info): Double quote to prevent globbing and 
word splitting.
   
   Did you mean:
   rm -rf "${source_dir}"/python/pyarrow/*.so.*
   
   
   In ci/scripts/python_wheel_macos_build.sh line 40:
   if [ $arch = "arm64" ]; then
        ^---^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
   
   Did you mean:
   if [ "$arch" = "arm64" ]; then
   
   
   In ci/scripts/python_wheel_macos_build.sh line 42:
     : ${ARROW_SIMD_LEVEL:="NEON"}
       ^-------------------------^ SC2223 (info): This default assignment may 
cause DoS due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 43:
   elif [ $arch = "x86_64" ]; then
          ^---^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
   
   Did you mean:
   elif [ "$arch" = "x86_64" ]; then
   
   
   In ci/scripts/python_wheel_macos_build.sh line 45:
     : ${ARROW_SIMD_LEVEL:="SSE4_2"}
       ^---------------------------^ SC2223 (info): This default assignment may 
cause DoS due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 55:
     -r ${source_dir}/python/requirements-wheel-build.txt
        ^-----------^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
   
   Did you mean:
     -r "${source_dir}"/python/requirements-wheel-build.txt
   
   
   In ci/scripts/python_wheel_macos_build.sh line 59:
   : ${ARROW_ACERO:=ON}
     ^----------------^ SC2223 (info): This default assignment may cause DoS 
due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 60:
   : ${ARROW_AZURE:=ON}
     ^----------------^ SC2223 (info): This default assignment may cause DoS 
due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 61:
   : ${ARROW_DATASET:=ON}
     ^------------------^ SC2223 (info): This default assignment may cause DoS 
due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 62:
   : ${ARROW_FLIGHT:=ON}
     ^-----------------^ SC2223 (info): This default assignment may cause DoS 
due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 63:
   : ${ARROW_GANDIVA:=OFF}
     ^-------------------^ SC2223 (info): This default assignment may cause DoS 
due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 64:
   : ${ARROW_GCS:=ON}
     ^--------------^ SC2223 (info): This default assignment may cause DoS due 
to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 65:
   : ${ARROW_HDFS:=ON}
     ^---------------^ SC2223 (info): This default assignment may cause DoS due 
to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 66:
   : ${ARROW_JEMALLOC:=ON}
     ^-------------------^ SC2223 (info): This default assignment may cause DoS 
due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 67:
   : ${ARROW_MIMALLOC:=ON}
     ^-------------------^ SC2223 (info): This default assignment may cause DoS 
due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 68:
   : ${ARROW_ORC:=ON}
     ^--------------^ SC2223 (info): This default assignment may cause DoS due 
to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 69:
   : ${ARROW_PARQUET:=ON}
     ^------------------^ SC2223 (info): This default assignment may cause DoS 
due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 70:
   : ${PARQUET_REQUIRE_ENCRYPTION:=ON}
     ^-- SC2223 (info): This default assignment may cause DoS due to globbing. 
Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 71:
   : ${ARROW_SUBSTRAIT:=ON}
     ^--------------------^ SC2223 (info): This default assignment may cause 
DoS due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 72:
   : ${ARROW_S3:=ON}
     ^-------------^ SC2223 (info): This default assignment may cause DoS due 
to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 73:
   : ${ARROW_TENSORFLOW:=ON}
     ^---------------------^ SC2223 (info): This default assignment may cause 
DoS due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 74:
   : ${ARROW_WITH_BROTLI:=ON}
     ^----------------------^ SC2223 (info): This default assignment may cause 
DoS due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 75:
   : ${ARROW_WITH_BZ2:=ON}
     ^-------------------^ SC2223 (info): This default assignment may cause DoS 
due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 76:
   : ${ARROW_WITH_LZ4:=ON}
     ^-------------------^ SC2223 (info): This default assignment may cause DoS 
due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 77:
   : ${ARROW_WITH_OPENTELEMETRY:=ON}
     ^-----------------------------^ SC2223 (info): This default assignment may 
cause DoS due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 78:
   : ${ARROW_WITH_SNAPPY:=ON}
     ^----------------------^ SC2223 (info): This default assignment may cause 
DoS due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 79:
   : ${ARROW_WITH_ZLIB:=ON}
     ^--------------------^ SC2223 (info): This default assignment may cause 
DoS due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 80:
   : ${ARROW_WITH_ZSTD:=ON}
     ^--------------------^ SC2223 (info): This default assignment may cause 
DoS due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 81:
   : ${CMAKE_BUILD_TYPE:=release}
     ^--------------------------^ SC2223 (info): This default assignment may 
cause DoS due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 82:
   : ${CMAKE_GENERATOR:=Ninja}
     ^-----------------------^ SC2223 (info): This default assignment may cause 
DoS due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 83:
   : ${CMAKE_UNITY_BUILD:=ON}
     ^----------------------^ SC2223 (info): This default assignment may cause 
DoS due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 84:
   : ${VCPKG_ROOT:=/opt/vcpkg}
     ^-----------------------^ SC2223 (info): This default assignment may cause 
DoS due to globbing. Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 85:
   : ${VCPKG_FEATURE_FLAGS:=-manifests}
     ^-- SC2223 (info): This default assignment may cause DoS due to globbing. 
Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 86:
   : 
${VCPKG_TARGET_TRIPLET:=${VCPKG_DEFAULT_TRIPLET:-x64-osx-static-${CMAKE_BUILD_TYPE}}}
     ^-- SC2223 (info): This default assignment may cause DoS due to globbing. 
Quote it.
   
   
   In ci/scripts/python_wheel_macos_build.sh line 93:
   echo "$_pbc: `$_pbc --version`"
                ^---------------^ SC2006 (style): Use $(...) notation instead 
of legacy backticks `...`.
   
   Did you mean:
   echo "$_pbc: $($_pbc --version)"
   
   
   In ci/scripts/python_wheel_macos_build.sh line 95:
   mkdir -p ${build_dir}/build
            ^----------^ SC2086 (info): Double quote to prevent globbing and 
word splitting.
   
   Did you mean:
   mkdir -p "${build_dir}"/build
   
   
   In ci/scripts/python_wheel_macos_build.sh line 96:
   pushd ${build_dir}/build
         ^----------^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
   
   Did you mean:
   pushd "${build_dir}"/build
   
   
   In ci/scripts/python_wheel_macos_build.sh line 99:
       -DARROW_ACERO=${ARROW_ACERO} \
                     ^------------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
   
   Did you mean:
       -DARROW_ACERO="${ARROW_ACERO}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 100:
       -DARROW_AZURE=${ARROW_AZURE} \
                     ^------------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
   
   Did you mean:
       -DARROW_AZURE="${ARROW_AZURE}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 106:
       -DARROW_DATASET=${ARROW_DATASET} \
                       ^--------------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
   
   Did you mean:
       -DARROW_DATASET="${ARROW_DATASET}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 110:
       -DARROW_FLIGHT=${ARROW_FLIGHT} \
                      ^-------------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
   
   Did you mean:
       -DARROW_FLIGHT="${ARROW_FLIGHT}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 111:
       -DARROW_GANDIVA=${ARROW_GANDIVA} \
                       ^--------------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
   
   Did you mean:
       -DARROW_GANDIVA="${ARROW_GANDIVA}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 112:
       -DARROW_GCS=${ARROW_GCS} \
                   ^----------^ SC2086 (info): Double quote to prevent globbing 
and word splitting.
   
   Did you mean:
       -DARROW_GCS="${ARROW_GCS}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 113:
       -DARROW_HDFS=${ARROW_HDFS} \
                    ^-----------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
   
   Did you mean:
       -DARROW_HDFS="${ARROW_HDFS}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 114:
       -DARROW_JEMALLOC=${ARROW_JEMALLOC} \
                        ^---------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean:
       -DARROW_JEMALLOC="${ARROW_JEMALLOC}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 116:
       -DARROW_MIMALLOC=${ARROW_MIMALLOC} \
                        ^---------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean:
       -DARROW_MIMALLOC="${ARROW_MIMALLOC}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 117:
       -DARROW_ORC=${ARROW_ORC} \
                   ^----------^ SC2086 (info): Double quote to prevent globbing 
and word splitting.
   
   Did you mean:
       -DARROW_ORC="${ARROW_ORC}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 119:
       -DARROW_PARQUET=${ARROW_PARQUET} \
                       ^--------------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
   
   Did you mean:
       -DARROW_PARQUET="${ARROW_PARQUET}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 121:
       -DARROW_S3=${ARROW_S3} \
                  ^---------^ SC2086 (info): Double quote to prevent globbing 
and word splitting.
   
   Did you mean:
       -DARROW_S3="${ARROW_S3}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 122:
       -DARROW_SIMD_LEVEL=${ARROW_SIMD_LEVEL} \
                          ^-----------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean:
       -DARROW_SIMD_LEVEL="${ARROW_SIMD_LEVEL}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 123:
       -DARROW_SUBSTRAIT=${ARROW_SUBSTRAIT} \
                         ^----------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean:
       -DARROW_SUBSTRAIT="${ARROW_SUBSTRAIT}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 124:
       -DARROW_TENSORFLOW=${ARROW_TENSORFLOW} \
                          ^-----------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean:
       -DARROW_TENSORFLOW="${ARROW_TENSORFLOW}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 127:
       -DARROW_WITH_BROTLI=${ARROW_WITH_BROTLI} \
                           ^------------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean:
       -DARROW_WITH_BROTLI="${ARROW_WITH_BROTLI}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 128:
       -DARROW_WITH_BZ2=${ARROW_WITH_BZ2} \
                        ^---------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean:
       -DARROW_WITH_BZ2="${ARROW_WITH_BZ2}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 129:
       -DARROW_WITH_LZ4=${ARROW_WITH_LZ4} \
                        ^---------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean:
       -DARROW_WITH_LZ4="${ARROW_WITH_LZ4}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 130:
       -DARROW_WITH_OPENTELEMETRY=${ARROW_WITH_OPENTELEMETRY} \
                                  ^-------------------------^ SC2086 (info): 
Double quote to prevent globbing and word splitting.
   
   Did you mean:
       -DARROW_WITH_OPENTELEMETRY="${ARROW_WITH_OPENTELEMETRY}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 131:
       -DARROW_WITH_SNAPPY=${ARROW_WITH_SNAPPY} \
                           ^------------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean:
       -DARROW_WITH_SNAPPY="${ARROW_WITH_SNAPPY}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 132:
       -DARROW_WITH_ZLIB=${ARROW_WITH_ZLIB} \
                         ^----------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean:
       -DARROW_WITH_ZLIB="${ARROW_WITH_ZLIB}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 133:
       -DARROW_WITH_ZSTD=${ARROW_WITH_ZSTD} \
                         ^----------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean:
       -DARROW_WITH_ZSTD="${ARROW_WITH_ZSTD}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 135:
       -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
                          ^-----------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean:
       -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 137:
       -DCMAKE_INSTALL_PREFIX=${build_dir}/install \
                              ^----------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean:
       -DCMAKE_INSTALL_PREFIX="${build_dir}"/install \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 139:
       -DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD} \
                           ^------------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean:
       -DCMAKE_UNITY_BUILD="${CMAKE_UNITY_BUILD}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 140:
       -DPARQUET_REQUIRE_ENCRYPTION=${PARQUET_REQUIRE_ENCRYPTION} \
                                    ^---------------------------^ SC2086 
(info): Double quote to prevent globbing and word splitting.
   
   Did you mean:
       -DPARQUET_REQUIRE_ENCRYPTION="${PARQUET_REQUIRE_ENCRYPTION}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 142:
       -DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} \
                              ^---------------------^ SC2086 (info): Double 
quote to prevent globbing and word splitting.
   
   Did you mean:
       -DVCPKG_TARGET_TRIPLET="${VCPKG_TARGET_TRIPLET}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 144:
       -G ${CMAKE_GENERATOR} \
          ^----------------^ SC2086 (info): Double quote to prevent globbing 
and word splitting.
   
   Did you mean:
       -G "${CMAKE_GENERATOR}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 145:
       ${source_dir}/cpp
       ^-----------^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
   
   Did you mean:
       "${source_dir}"/cpp
   
   
   In ci/scripts/python_wheel_macos_build.sh line 171:
   pushd ${source_dir}/python
         ^-----------^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
   
   Did you mean:
   pushd "${source_dir}"/python
   
   
   In ci/scripts/python_wheel_macos_build.sh line 174:
     -C cmake.build-type=${CMAKE_BUILD_TYPE:-Debug} \
                         ^------------------------^ SC2086 (info): Double quote 
to prevent globbing and word splitting.
   
   Did you mean:
     -C cmake.build-type="${CMAKE_BUILD_TYPE:-Debug}" \
   
   
   In ci/scripts/python_wheel_macos_build.sh line 180:
   deps=$(delocate-listdeps ${source_dir}/python/dist/*.whl)
                            ^-----------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean:
   deps=$(delocate-listdeps "${source_dir}"/python/dist/*.whl)
   
   
   In ci/scripts/python_wheel_macos_build.sh line 182:
   if echo $deps | grep -v "^pyarrow/lib\(arrow\|gandiva\|parquet\)"; then
           ^---^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
   
   Did you mean:
   if echo "$deps" | grep -v "^pyarrow/lib\(arrow\|gandiva\|parquet\)"; then
   
   
   In ci/scripts/python_wheel_macos_build.sh line 188:
   mkdir -p ${source_dir}/python/repaired_wheels
            ^-----------^ SC2086 (info): Double quote to prevent globbing and 
word splitting.
   
   Did you mean:
   mkdir -p "${source_dir}"/python/repaired_wheels
   
   
   In ci/scripts/python_wheel_macos_build.sh line 189:
   mv ${source_dir}/python/dist/*.whl ${source_dir}/python/repaired_wheels/
      ^-----------^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
                                      ^-----------^ SC2086 (info): Double quote 
to prevent globbing and word splitting.
   
   Did you mean:
   mv "${source_dir}"/python/dist/*.whl "${source_dir}"/python/repaired_wheels/
   
   For more information:
     https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing 
...
     https://www.shellcheck.net/wiki/SC2223 -- This default assignment may 
cause...
     https://www.shellcheck.net/wiki/SC2006 -- Use $(...) notation instead of 
le...
   ```  
   
   ### What changes are included in this PR?
   
   * SC2086: Quote variable expansions
   * SC2223: Simplify default assignment
   * SC2006: Replace backticks with `$(...)`
   
   ### 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]

Reply via email to