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

   ### 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?
   
   
   ### Are there any user-facing changes?
   
   **This PR includes breaking changes to public APIs.** (If there are any 
breaking changes to public APIs, please explain which changes are breaking. If 
not, you can remove this.)
   
   **This PR contains a "Critical Fix".** (If the changes fix either (a) a 
security vulnerability, (b) a bug that caused incorrect or invalid data to be 
produced, or (c) a bug that causes a crash (even when the API contract is 
upheld), please provide explanation. If not, you can remove this.)
   


-- 
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