Skip to content
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

[ci] Source shellcheck from nix instead of installing via script #3811

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

maru-ava
Copy link
Contributor

Why this should be merged

We're already using nix and it's simpler not to have to maintain a multi-platform installer.

How this works

  • Adds shellcheck to the flake devshell
  • Removes installation from the shellcheck script
  • Updates the CI job to use nix

How this was tested

CI

Need to be documented in RELEASES.md?

N/A

@maru-ava maru-ava added testing This primarily focuses on testing ci This focuses on changes to the CI process labels Mar 18, 2025
@maru-ava maru-ava self-assigned this Mar 18, 2025
Copy link
Contributor

@ARR4N ARR4N left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI there's a shellcheck action that avoids the indirection via a script.

cp /tmp/shellcheck-"${VERSION}"/shellcheck "${SHELLCHECK}"
fi
fi

# `find *` is the simplest way to ensure find does not include a
# leading `.` in filenames it emits. A leading `.` will prevent the
# use of `git apply` to fix reported shellcheck issues. This is
# compatible with both macos and linux (unlike the use of -printf).
#
# shellcheck disable=SC2035
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's shellcheck all the way down!

@maru-ava
Copy link
Contributor Author

maru-ava commented Mar 18, 2025

FYI there's a shellcheck action that avoids the indirection via a script.

I'm aware, but an action doesn't solve the problem of local execution. Unless an action is performing something that makes no sense to perform outside of a github action runner, I always prefer a non-action solution that can be easily run locally.

edit: And yes, I'm aware of https://github.com/nektos/act, but I think being able to run without that indirection is also preferable.

Copy link
Contributor

@StephenButtolph StephenButtolph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - will merge after the v1.13.0 release cycle finishes.

@StephenButtolph StephenButtolph added this pull request to the merge queue Mar 21, 2025
Merged via the queue into master with commit aed51b0 Mar 21, 2025
23 checks passed
@StephenButtolph StephenButtolph deleted the ci-nix-shellcheck branch March 21, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci This focuses on changes to the CI process testing This primarily focuses on testing
Projects
Status: Done ✅
Development

Successfully merging this pull request may close these issues.

3 participants