-
Notifications
You must be signed in to change notification settings - Fork 459
chore: Solve shellcheck problems #13238
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
chore: Solve shellcheck problems #13238
Conversation
Signed-off-by: Marek Kubica <marek@tarides.com>
Signed-off-by: Marek Kubica <marek@tarides.com>
Signed-off-by: Marek Kubica <marek@tarides.com>
3a37f93 to
d34e219
Compare
|
A few more issues pointed out by CI: |
|
Yes, it's weird, my local shellcheck does not complain about them. I'll try to fix them going through the CI errors. |
Signed-off-by: Marek Kubica <marek@tarides.com>
Signed-off-by: Marek Kubica <marek@tarides.com>
|
@Leonidas-from-XIV Likely your version is older compared to the one in nixpkgs. |
|
@Alizter No, I think the failure is due to Shellcheck 0.10 on Ubuntu, which complains on valid things like I have 0.11 (latest release) on my system. I tried to investigate what nixpkgs-unstable ships with but the repo structure is too complex to figure out what is going on without investing too much time. |
https://search.nixos.org/packages?channel=25.11&show=shellcheck&query=shellcheck Shows 0.11. Looking at the "source" of the derivation there are many configuration options. So it's likely they chose a different set of default config options to how its packaged on Ubuntu. |
|
How about we just copy one of these sets of configuration options into our repo and point our shellcheck to use it? |
For me the "Source" link goes to https://github.com/NixOS/nixpkgs/blob/nixos-25.11/pkgs/development/haskell-modules/generic-builder.nix#L887 which doesn't mention shellcheck or any options (same on the "unstable" tab). But yes, I think it would be nice to have a consistent set of configuration options in our repo for shellcheck to use. |
This PR follows up #13233 and solves remaining issues shellcheck was complaining about.
I've opted to disable SC2016 as it states:
Writing the code
"\$SANDBOX"to satisfy SC is less readable and IMHO worse, thus I would actually suggest we globally disable it.