Skip to content

[CI][Dev] Fix shellcheck errors in the ci/scripts/integration_skyhook.sh #47186

@hiroyuki-sato

Description

@hiroyuki-sato

Describe the enhancement requested

This is the sub issue #44748.

  • SC2034: MIRROR_ID appears unused. Verify use (or export if used externally).
  • SC2086: Double quote to prevent globbing and word splitting.
  • SC2115: Use "${var:?}" to ensure this never expands to /* .
  • SC2143: Use grep -q instead of comparing output with [ -n .. ].
ci/scripts/integration_skyhook.sh

In ci/scripts/integration_skyhook.sh line 37:
rm -rf ${DIR}/*
       ^------^ SC2115 (warning): Use "${var:?}" to ensure this never expands to /* .


In ci/scripts/integration_skyhook.sh line 47:
MIRROR_ID="m"
^-------^ SC2034 (warning): MIRROR_ID appears unused. Verify use (or export if used externally).


In ci/scripts/integration_skyhook.sh line 91:
ceph osd crush add osd.${OSD_ID} 1 root=default
                       ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
ceph osd crush add osd."${OSD_ID}" 1 root=default


In ci/scripts/integration_skyhook.sh line 92:
ceph-osd --id ${OSD_ID} --mkjournal --mkfs
              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
ceph-osd --id "${OSD_ID}" --mkjournal --mkfs


In ci/scripts/integration_skyhook.sh line 93:
ceph-osd --id ${OSD_ID} || ceph-osd --id ${OSD_ID} || ceph-osd --id ${OSD_ID}
              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                         ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                    ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
ceph-osd --id "${OSD_ID}" || ceph-osd --id "${OSD_ID}" || ceph-osd --id "${OSD_ID}"


In ci/scripts/integration_skyhook.sh line 103:
while [[ ! $(ceph mds stat | grep "up:active") ]]; do sleep 1; done
           ^-- SC2143 (style): Use grep -q instead of comparing output with [ -n .. ].


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

Did you mean:
pushd "${ARROW_BUILD_DIR}"

For more information:
  https://www.shellcheck.net/wiki/SC2034 -- MIRROR_ID appears unused. Verify ...
  https://www.shellcheck.net/wiki/SC2115 -- Use "${var:?}" to ensure this nev...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

Component(s)

Continuous Integration

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions