3 ms·
> Linting Use shellcheck Shellcheck has saved me countless times, but I noticed it's hard to get people to adopt it into their workflow. I've introduced proba
by nomel 8y ago
> Linting Use shellcheck
Shellcheck has saved me countless times, but I noticed it's hard to get people to adopt it into their workflow.
I've introduced probably a dozen people to shellcheck and warn them ahead of time that their scripts are broken. They try it, see a flood of errors and warnings, close the window, and never use it again.
The logic surrounding their undefined variables and improper conditions happen to work as hoped, by luck, combined with their strict adherence to "it's best practice to not use spaces" both keep their scripts crawling along "just fine".
- yesenadam 8y agoI just went to install it with macports, it says: "The following dependencies will be installed: autoconf automake bzip2 clang-3.3 clang-4.0 clang_select cmake curl curl-ca-bundle db48 expat gcc6 gdbm ghc ghc-bootstrap glib2 gmake gmp help2man hs-json hs-mtl hs-parsec hs-primitive hs-quickcheck-devel hs-random hs-regex-base hs-regex-tdfa hs-syb hs-text hs-tf-random icu isl ld64 ld64-97 legacy-support libarchive libcxx libedit libffi libgcc libgcc6 libgcc7 libidn2 libmpc libomp libpsl libtool libunistring libuv libxml2 libxslt llvm-3.3 llvm-3.5 llvm-4.0 llvm_select lz4 lzo2 m4 mpfr openssl p5.28-locale-gettext pcre perl5 perl5.26 perl5.28 pkgconfig python27 python2_select python_select readline sqlite3 texinfo xar xattr zlib zstd Continue [Y/n]:" ..uh maybe not right now.
- mehrdadn 8y agoI like how there's GCC, GCC6, GCC7, LLVM-3.3, LLVM-3.5, and LLVM-4.0...
- woodruffw 8y agoIt looks like the MacPorts version of shellcheck is substantially out-of-date[1]. `brew info shellcheck` shows just three (build-time) dependencies: cabal-install, ghc, and pandoc. [1]: https://github.com/macports/macports-ports/commits/master/devel/shellcheck/Portfile https://github.com/macports/macports-ports/commits/master/de...
- yesenadam 8y agoYeah, probably is, I only use macports as my computer is substantially out of date (2006)! But even my 'port info shellcheck' (0.3.8) only says: Build Dependencies: apple-gcc42 Library Dependencies: ghc, hs-json, hs-mtl, hs-parsec, hs-quickcheck-devel, hs-regex-tdfa
- l2dy 8y agoYes, it hasn't been updated because dependencies have to be updated first. See recent discussion on updating ghc: https://trac.macports.org/ticket/48899#comment:43 https://trac.macports.org/ticket/48899#comment:43.
- yesenadam 8y agoOh thanks! That's a fascinating discussion.