3 ms·
I recommend shellcheck as well. It might not catch your problem, but it will point out possible problems. Also I recommend: rewriting scripts in another langua
by schneems 3y ago
I recommend shellcheck as well. It might not catch your problem, but it will point out possible problems.
Also I recommend: rewriting scripts in another language. At work we are converting bash scripts to rust and while it’s a high ramp-up time, the resulting code is much easier to maintain and I have a much higher level of confidence in them. Bash is still good for quick scripts but once you hit 100 lines or so you really deserve a language with stronger guarantees.
- riperoni 3y agoI agree, but we gotta tell that to CI/CD engineering and yaml-pipelines
- sestep 3y agoWhen I was at Facebook, I wrote a Python script to extract shell scripts from GitHub Actions workflows, so we could run them all through ShellCheck: https://github.com/pytorch/pytorch/blob/69e0bda9996865e319db6afa318c8e27ee38d002/tools/extract_scripts.py https://github.com/pytorch/pytorch/blob/69e0bda9996865e319db...