You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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.
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.
The text was updated successfully, but these errors were encountered:
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.)
When @gnprice said:
@andersk replied:
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 maketools/test shell
(or similar) a thing, so we can run it frequently and in CI.The text was updated successfully, but these errors were encountered: