Skip to content

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

Merged
kou merged 2 commits into
apache:mainfrom
hiroyuki-sato:topic/shellcheck-r_docker_configure
Aug 3, 2026
Merged

GH-50766: [CI][Dev] Fix shellcheck errors in the ci/scripts/r_docker_configure.sh#50767
kou merged 2 commits into
apache:mainfrom
hiroyuki-sato:topic/shellcheck-r_docker_configure

Conversation

@hiroyuki-sato

@hiroyuki-sato hiroyuki-sato commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Rationale for this change

This is the sub issue #44748.

  • SC2006 (style): Use $(...) notation instead of legacy backticks
  • 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...

What changes are included in this PR?

  • SC2006 Use $(...) notation instead of legacy backticks
  • SC2046: Quote variable to prevent word splitting.
  • SC2086: Quote variable expansions.
  • SC2223: Quote default variable assignments.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

⚠️ GitHub issue #50766 has been automatically assigned in GitHub to PR creator.

@github-actions github-actions Bot added the awaiting review Awaiting review label Aug 2, 2026
@hiroyuki-sato

Copy link
Copy Markdown
Collaborator Author

@github-actions crossbow submit -g r

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

Revision: 3f94d94

Submitted crossbow builds: ursacomputing/crossbow @ actions-06a65b33b5

Task Status
r-binary-packages GitHub Actions
r-recheck-most GitHub Actions
test-r-alpine-linux-cran GitHub Actions
test-r-arrow-backwards-compatibility GitHub Actions
test-r-depsource-system GitHub Actions
test-r-dev-duckdb GitHub Actions
test-r-devdocs GitHub Actions
test-r-extra-packages GitHub Actions
test-r-fedora-clang GitHub Actions
test-r-gcc-11 GitHub Actions
test-r-gcc-12 GitHub Actions
test-r-install-local GitHub Actions
test-r-install-local-minsizerel GitHub Actions
test-r-linux-as-cran GitHub Actions
test-r-linux-rchk GitHub Actions
test-r-linux-sanitizers GitHub Actions
test-r-linux-valgrind GitHub Actions
test-r-m1-san GitHub Actions
test-r-macos-as-cran GitHub Actions
test-r-offline-maximal GitHub Actions
test-r-ubuntu-22.04 GitHub Actions
test-r-versions GitHub Actions
test-r-wasm GitHub Actions

@kou kou 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.

+1

Comment thread ci/scripts/r_docker_configure.sh Outdated
@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Aug 3, 2026
@hiroyuki-sato

Copy link
Copy Markdown
Collaborator Author

@github-actions crossbow submit -g r

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Revision: 5556284

Submitted crossbow builds: ursacomputing/crossbow @ actions-962ba4dbba

Task Status
r-binary-packages GitHub Actions
r-recheck-most GitHub Actions
test-r-alpine-linux-cran GitHub Actions
test-r-arrow-backwards-compatibility GitHub Actions
test-r-depsource-system GitHub Actions
test-r-dev-duckdb GitHub Actions
test-r-devdocs GitHub Actions
test-r-extra-packages GitHub Actions
test-r-fedora-clang GitHub Actions
test-r-gcc-11 GitHub Actions
test-r-gcc-12 GitHub Actions
test-r-install-local GitHub Actions
test-r-install-local-minsizerel GitHub Actions
test-r-linux-as-cran GitHub Actions
test-r-linux-rchk GitHub Actions
test-r-linux-sanitizers GitHub Actions
test-r-linux-valgrind GitHub Actions
test-r-m1-san GitHub Actions
test-r-macos-as-cran GitHub Actions
test-r-offline-maximal GitHub Actions
test-r-ubuntu-22.04 GitHub Actions
test-r-versions GitHub Actions
test-r-wasm GitHub Actions

@kou kou 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.

+1

@kou
kou merged commit fd38cf6 into apache:main Aug 3, 2026
44 checks passed
@kou kou removed the awaiting merge Awaiting merge label Aug 3, 2026
@github-actions github-actions Bot added the awaiting merge Awaiting merge label Aug 3, 2026
@hiroyuki-sato
hiroyuki-sato deleted the topic/shellcheck-r_docker_configure branch August 3, 2026 05:43
@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit fd38cf6.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 38 possible false positives for unstable benchmarks that are known to sometimes produce them.

@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit fd38cf6.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 38 possible false positives for unstable benchmarks that are known to sometimes produce them.

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

Labels

awaiting merge Awaiting merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants