Skip to content

GH-46763: [CI][Dev] fix shellcheck errors in the ci/scripts/ccache_setup.sh #46766

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hiroyuki-sato
Copy link
Collaborator

@hiroyuki-sato hiroyuki-sato commented Jun 10, 2025

Rationale for this change

This is the sub issue #44748.

  • SC2086: (info): Double quote to prevent globbing and word splitting.
  • SC2129: Consider using { cmd1; cmd2; } >> file instead of individual redirects.
shellcheck ci/scripts/ccache_setup.sh

In ci/scripts/ccache_setup.sh line 22:
echo "ARROW_USE_CCACHE=ON" >> $GITHUB_ENV
^-- SC2129 (style): Consider using { cmd1; cmd2; } >> file instead of individual redirects.
                              ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
echo "ARROW_USE_CCACHE=ON" >> "$GITHUB_ENV"


In ci/scripts/ccache_setup.sh line 23:
echo "CCACHE_COMPILERCHECK=content" >> $GITHUB_ENV
                                       ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
echo "CCACHE_COMPILERCHECK=content" >> "$GITHUB_ENV"


In ci/scripts/ccache_setup.sh line 24:
echo "CCACHE_COMPRESS=1" >> $GITHUB_ENV
                            ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
echo "CCACHE_COMPRESS=1" >> "$GITHUB_ENV"


In ci/scripts/ccache_setup.sh line 25:
echo "CCACHE_COMPRESSLEVEL=6" >> $GITHUB_ENV
                                 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
echo "CCACHE_COMPRESSLEVEL=6" >> "$GITHUB_ENV"


In ci/scripts/ccache_setup.sh line 26:
echo "CCACHE_MAXSIZE=1G" >> $GITHUB_ENV
                            ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
echo "CCACHE_MAXSIZE=1G" >> "$GITHUB_ENV"

For more information:
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
  https://www.shellcheck.net/wiki/SC2129 -- Consider using { cmd1; cmd2; } >>...
palolovalley:arrow hsato$ vi ci/scripts/ccache_setup.sh

What changes are included in this PR?

  • SC2086: Quoting like "$GITHUB_ENV"
  • SC2129: combine multiple commands using {}

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

Copy link

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

@github-actions github-actions bot added the awaiting review Awaiting review label Jun 10, 2025
@hiroyuki-sato
Copy link
Collaborator Author

@github-actions crossbow submit -g cpp -g ruby

Copy link

Revision: 74cc885

Submitted crossbow builds: ursacomputing/crossbow @ actions-efb3af9cc5

Task Status
example-cpp-minimal-build-static GitHub Actions
example-cpp-minimal-build-static-system-dependency GitHub Actions
example-cpp-tutorial GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-cuda-cpp-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-debian-12-cpp-amd64 GitHub Actions
test-debian-12-cpp-i386 GitHub Actions
test-debian-ruby GitHub Actions
test-fedora-39-cpp GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-20 GitHub Actions
test-ubuntu-22.04-cpp-bundled GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-bundled-offline GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions
test-ubuntu-24.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-24.04-cpp-thread-sanitizer GitHub Actions
test-ubuntu-ruby GitHub Actions

@hiroyuki-sato
Copy link
Collaborator Author

msys2_setup.sh used by .github/workflows/cpp.yml and .github/workflows/ruby.yml

So I tried crossbow ruby and cpp

rg -l 'ccache_setup.sh'
ci/scripts/msys2_setup.sh

rg -l 'msys2_setup.sh' .github/workflows/
.github/workflows/cpp.yml
.github/workflows/ruby.yml

@hiroyuki-sato
Copy link
Collaborator Author

@github-actions crossbow submit test-ubuntu-22.04-cpp-bundled

Copy link

Revision: 74cc885

Submitted crossbow builds: ursacomputing/crossbow @ actions-4830b2d151

Task Status
test-ubuntu-22.04-cpp-bundled GitHub Actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review Awaiting review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant