Skip to content

GH-50609: [CI][Dev] Fix shellcheck errors in the ci/scripts/r_deps.sh#50610

Open
hiroyuki-sato wants to merge 4 commits into
apache:mainfrom
hiroyuki-sato:topic/shellcheck-r_deps
Open

GH-50609: [CI][Dev] Fix shellcheck errors in the ci/scripts/r_deps.sh#50610
hiroyuki-sato wants to merge 4 commits into
apache:mainfrom
hiroyuki-sato:topic/shellcheck-r_deps

Conversation

@hiroyuki-sato

@hiroyuki-sato hiroyuki-sato commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Rationale for this change

This is the sub issue #44748.

  • SC2027: The surrounding quotes actually unquote this. Remove or escape them.
  • 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_deps.sh

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


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


In ci/scripts/r_deps.sh line 24:
R_PRUNE_DEPS=`echo $R_PRUNE_DEPS | 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_PRUNE_DEPS=$(echo "$R_PRUNE_DEPS" | tr '[:upper:]' '[:lower:]')


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


In ci/scripts/r_deps.sh line 27:
R_DUCKDB_DEV=`echo $R_DUCKDB_DEV | 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_DUCKDB_DEV=$(echo "$R_DUCKDB_DEV" | tr '[:upper:]' '[:lower:]')


In ci/scripts/r_deps.sh line 31:
pushd ${source_dir}
      ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
pushd "${source_dir}"


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

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


In ci/scripts/r_deps.sh line 46:
${R_BIN} -e "options(warn=2); install.packages('remotes'); remotes::install_cran(c('glue', 'rcmdcheck', 'sys')); remotes::install_deps(INSTALL_opts = '"${INSTALL_ARGS}"')"
                                                                                                                                                        ^-------------^ SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them.
                                                                                                                                                        ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
${R_BIN} -e "options(warn=2); install.packages('remotes'); remotes::install_cran(c('glue', 'rcmdcheck', 'sys')); remotes::install_deps(INSTALL_opts = '""${INSTALL_ARGS}""')"


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

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


In ci/scripts/r_deps.sh line 55:
${R_BIN} -e "remotes::install_deps(dependencies = TRUE, INSTALL_opts = '"${INSTALL_ARGS}"')"
                                                                         ^-------------^ SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them.
                                                                         ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
${R_BIN} -e "remotes::install_deps(dependencies = TRUE, INSTALL_opts = '""${INSTALL_ARGS}""')"

For more information:
  https://www.shellcheck.net/wiki/SC2027 -- The surrounding quotes actually u...
  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?

  • SC2027: Remove redundant quotes.
  • SC2086: Quote variable expansions.
  • SC2223: Quote default variable assignments.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

@github-actions

Copy link
Copy Markdown

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

@github-actions github-actions Bot added the awaiting review Awaiting review label Jul 23, 2026
@kou kou added the CI: Extra: R Run extra R CI label Jul 23, 2026
@kou

kou commented Jul 23, 2026

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g r

Comment thread ci/scripts/r_deps.sh Outdated
@github-actions

Copy link
Copy Markdown

Revision: 48a4a03

Submitted crossbow builds: ursacomputing/crossbow @ actions-a93615c8b7

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

@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Jul 23, 2026
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
@github-actions github-actions Bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jul 23, 2026
@hiroyuki-sato

Copy link
Copy Markdown
Collaborator Author

@github-actions crossbow submit -g r

@github-actions

Copy link
Copy Markdown

Revision: 85f2b3e

Submitted crossbow builds: ursacomputing/crossbow @ actions-47fe7ddf85

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

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

Labels

awaiting change review Awaiting change review CI: Extra: R Run extra R CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants