Skip to content

[CI][Dev] Fix shellcheck errors in the ci/scripts/r_docker_configure.sh #50766

Closed

Description

@hiroyuki-sato

Describe the enhancement requested

This is the sub issue #44748.

  • SC2046: Quote this to prevent word splitting.
  • SC2086: Double quote to prevent globbing and word splitting.
  • SC2223: This default assignment may cause DoS due to globbing. Quote it.
shellcheck ci/scripts/r_docker_configure.sh

In ci/scripts/r_docker_configure.sh line 21:
: ${R_BIN:=R}
  ^---------^ SC2223 (info): This default assignment may cause DoS due to globbing. Quote it.


In ci/scripts/r_docker_configure.sh line 23:
: ${ARROW_SOURCE_HOME:=/arrow}
  ^--------------------------^ SC2223 (info): This default assignment may cause DoS due to globbing. Quote it.


In ci/scripts/r_docker_configure.sh line 29:
  cat ${ARROW_SOURCE_HOME}/ci/etc/rprofile >> $(${R_BIN} RHOME)/etc/Rprofile.site
      ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                              ^---------------^ SC2046 (warning): Quote this to prevent word splitting.

Did you mean:
  cat "${ARROW_SOURCE_HOME}"/ci/etc/rprofile >> $(${R_BIN} RHOME)/etc/Rprofile.site


In ci/scripts/r_docker_configure.sh line 33:
echo "MAKEFLAGS=-j$(${R_BIN} -s -e 'cat(parallel::detectCores())')" >> $(R RHOME)/etc/Renviron.site
                                                                       ^--------^ SC2046 (warning): Quote this to prevent word splitting.


In ci/scripts/r_docker_configure.sh line 36:
if [ "`which dnf`" ]; then
      ^---------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean:
if [ "$(which dnf)" ]; then


In ci/scripts/r_docker_configure.sh line 38:
elif [ "`which yum`" ]; then
        ^---------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean:
elif [ "$(which yum)" ]; then


In ci/scripts/r_docker_configure.sh line 40:
elif [ "`which zypper`" ]; then
        ^------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean:
elif [ "$(which zypper)" ]; then


In ci/scripts/r_docker_configure.sh line 42:
elif [ "`which apk`" ]; then
        ^---------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean:
elif [ "$(which apk)" ]; then


In ci/scripts/r_docker_configure.sh line 50:
: ${R_CUSTOM_CCACHE:=FALSE}
  ^-----------------------^ SC2223 (info): This default assignment may cause DoS due to globbing. Quote it.


In ci/scripts/r_docker_configure.sh line 51:
R_CUSTOM_CCACHE=`echo $R_CUSTOM_CCACHE | tr '[:upper:]' '[:lower:]'`
                ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
                      ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
R_CUSTOM_CCACHE=$(echo "$R_CUSTOM_CCACHE" | tr '[:upper:]' '[:lower:]')


In ci/scripts/r_docker_configure.sh line 52:
if [ ${R_CUSTOM_CCACHE} = "true" ]; then
     ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
if [ "${R_CUSTOM_CCACHE}" = "true" ]; then

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
  https://www.shellcheck.net/wiki/SC2223 -- This default assignment may cause...

Component(s)

Developer Tools

Activity

  1. added a commit that references this issue on Aug 3, 2026
  2. added a commit that references this issue on Aug 3, 2026
  3. added this to the 26.0.0 milestone on Aug 3, 2026
  4. kou commented on Aug 3, 2026

    @kou
    Member

    Issue resolved by pull request 50767
    #50767

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions