Skip to content

[CI][Dev] Fix shellcheck errors in the ci/scripts/r_valgrind.sh #50796

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_valgrind.sh

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


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

Did you mean:
pushd "${source_dir}"


In ci/scripts/r_valgrind.sh line 31:
${R_BIN} CMD INSTALL ${INSTALL_ARGS} arrow*.tar.gz
                     ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
${R_BIN} CMD INSTALL "${INSTALL_ARGS}" arrow*.tar.gz


In ci/scripts/r_valgrind.sh line 42:
if [ $(grep -c "ERROR SUMMARY: 0 errors" testthat.out) != 1 ]; then
     ^-- SC2046 (warning): Quote this to prevent word splitting.

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)

Continuous Integration

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions