4 ms·
I use shfmt and shellcheck together with pre-commit. I like to use the shfmt-py and shellcheck-py pre-commit hooks as opposed to https://github.com/jumanjihouse
by js2 4y ago
I use shfmt and shellcheck together with pre-commit. I like to use the shfmt-py and shellcheck-py pre-commit hooks as opposed to https://github.com/jumanjihouse/pre-commit-hooks https://github.com/jumanjihouse/pre-commit-hooks as they'll install the shfmt/shellcheck prebuilt binaries as needed:
https://github.com/maxwinterstein/shfmt-py https://github.com/maxwinterstein/shfmt-py
https://github.com/shellcheck-py/shellcheck-py https://github.com/shellcheck-py/shellcheck-py
- one-punch 4y agoAn alternative to have both `shfmt` and `shellcheck` and all pre-commit hooks managed (that is, automatically installed until no longer used and garbage collected) is to use https://devenv.sh/ https://devenv.sh/. After `devenv init`, update `devenv.nix` as follows: { pkgs, ... }: { pre-commit.hooks = { shellcheck.enable = true; shfmt.enable = true; }; }