hiroyuki-sato opened a new pull request, #50918:
URL: https://github.com/apache/arrow/pull/50918
### Rationale for this change
This is the sub issue #44748.
* SC2034: foo appears unused. Verify it or export it.
* SC2207: Prefer mapfile or read -a to split command output (or quote to
avoid splitting).
* SC2086: Double quote to prevent globbing and word splitting.
```
shellcheck cpp/build-support/*flatbuffer*.sh
In cpp/build-support/update-flatbuffers.sh line 27:
PYTHON_SOURCE_DIR="$CWD/../../python"
^---------------^ SC2034 (warning): PYTHON_SOURCE_DIR appears unused. Verify
use (or export if used externally).
In cpp/build-support/update-flatbuffers.sh line 29:
TOP="$FORMAT_DIR/.."
^-^ SC2034 (warning): TOP appears unused. Verify use (or export if used
externally).
In cpp/build-support/update-flatbuffers.sh line 33:
FILES=($(find $FORMAT_DIR -name '*.fbs'))
^-- SC2207 (warning): Prefer mapfile or read -a to split command
output (or quote to avoid splitting).
^---------^ SC2086 (info): Double quote to prevent globbing
and word splitting.
Did you mean:
FILES=($(find "$FORMAT_DIR" -name '*.fbs'))
In cpp/build-support/vendor-flatbuffers.sh line 28:
mkdir -p $VENDOR_LOCATION
^--------------^ SC2086 (info): Double quote to prevent globbing
and word splitting.
Did you mean:
mkdir -p "$VENDOR_LOCATION"
In cpp/build-support/vendor-flatbuffers.sh line 29:
cp -f $FLATBUFFERS_HOME/include/flatbuffers/base.h $VENDOR_LOCATION
^---------------^ SC2086 (info): Double quote to prevent globbing and
word splitting.
^--------------^ SC2086
(info): Double quote to prevent globbing and word splitting.
Did you mean:
cp -f "$FLATBUFFERS_HOME"/include/flatbuffers/base.h "$VENDOR_LOCATION"
In cpp/build-support/vendor-flatbuffers.sh line 30:
cp -f $FLATBUFFERS_HOME/include/flatbuffers/flatbuffers.h $VENDOR_LOCATION
^---------------^ SC2086 (info): Double quote to prevent globbing and
word splitting.
^--------------^
SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
cp -f "$FLATBUFFERS_HOME"/include/flatbuffers/flatbuffers.h
"$VENDOR_LOCATION"
In cpp/build-support/vendor-flatbuffers.sh line 31:
cp -f $FLATBUFFERS_HOME/include/flatbuffers/stl_emulation.h $VENDOR_LOCATION
^---------------^ SC2086 (info): Double quote to prevent globbing and
word splitting.
^--------------^
SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
cp -f "$FLATBUFFERS_HOME"/include/flatbuffers/stl_emulation.h
"$VENDOR_LOCATION"
For more information:
https://www.shellcheck.net/wiki/SC2034 -- PYTHON_SOURCE_DIR appears
unused....
https://www.shellcheck.net/wiki/SC2207 -- Prefer mapfile or read -a to
spli...
https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing
...
```
### What changes are included in this PR?
* SC2034: Comment out unused variables
* SC2207: Populate arrays without command substitution
* SC2086: Quote variables
### Are these changes tested?
Yes.
### Are there any user-facing changes?
No.
--
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]