-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
build(ci): add shellcheck linting #57
base: master
Are you sure you want to change the base?
Conversation
e99b8c0
to
7cef3a8
Compare
I've addressed most of the shellcheck feedback, after manually setting My concerns at this point:
|
c955b10
to
8f6b450
Compare
8f6b450
to
fc3fcdc
Compare
Okay, rebased now that fish shell support has been merged. I think I just need to figure out that In addition @jdelStrother do you have any idea if something similar to shellcheck exists that can lint fish scripts? I see there is |
I don't believe so, unfortunately. (Though at least fish has a few less footguns than bash does) |
fixes shellcheck SC3043: https://github.com/koalaman/shellcheck/wiki/SC3043 strictly speaking, local is not POSIX, but is supported in many shells, including bash, ksh, dash, and BusyBox ash. We could disable this rule, but perhaps safer to just do the effort to try to be fully POSIX compliant for now, even though it makes the script more difficult to read and reason about.
Hmm, trying to figure out what's going on here. Removing the It believe perhaps what happens is when this happens in an I can duplicate this with a test file # remove any existing `foo` aliases or shell functions
unalias foo > /dev/null 2>&1
unset -f foo > /dev/null 2>&1
foo() {
echo "hello world\n"
} And running the following from a zsh shell:
Loading the file via |
fixes #54