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

Run shellcheck, add to tools/test. #4130

Open
chrisbobbe opened this issue May 29, 2020 · 0 comments
Open

Run shellcheck, add to tools/test. #4130

chrisbobbe opened this issue May 29, 2020 · 0 comments
Labels

Comments

@chrisbobbe
Copy link
Contributor

chrisbobbe commented May 29, 2020

When @gnprice said:

@andersk Do you know of another good resource to point to for the key points of writing shell scripts? I linked to two below but I feel like there are a few other good things to mention that they don't cover.

@andersk replied:

Yes! Run ShellCheck on all of your shell scripts and get them down to zero diagnostics. Run it every time you commit. Run it in CI. Run it automatically in your editor. ShellCheck knows things that you didn’t know you needed to know. ShellCheck knows things that I didn’t know I needed to know. ShellCheck is excellent. ShellCheck is magical. ShellCheck is the one shining beacon of hope in the vast fiery hellscape that is the world of UNIX shell scripting. Run ShellCheck.

Run it.

Running shellcheck tools/test on master currently gives five or six warnings in that script. I haven't investigated any of them yet, but it sounds like a good goal to do so, and to maybe make tools/test shell (or similar) a thing, so we can run it frequently and in CI.

gnprice added a commit to gnprice/zulip-mobile that referenced this issue May 3, 2021
We don't actually *use* ShellCheck routinely at present -- though we
should, zulip#4130 -- but this gives a nice hint to the human reader, too.

(We don't use a shebang line for this, because this file isn't and
shouldn't be executable.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant