5 ms·
Is there a linter to ensure scripts are portable across shells? I try to write them like that but I'm certainly no master so I write them to work with busybox.
by honkcity 6mo ago
Is there a linter to ensure scripts are portable across shells? I try to write them like that but I'm certainly no master so I write them to work with busybox.
- gaigalas 6mo agoA linter, not yet. You can use what I use: https://github.com/alganet/shell-versions https://github.com/alganet/shell-versions It's a container with lots of shells that you can test. Like esvu but for the shell. Might have a little outdated docs, hit me with an issue if you use it and face any problems (I'm also the author).
- pvtmert 6mo agoI think shellcheck helps quite a lot, you must set type to "sh" (not bash) somewhere in the comments though...