4 ms·
FYI the author also offers an absurdly good commandline shellscript linter: https://github.com/koalaman/shellcheck https://github.com/koalaman/shellcheck It's
by frou_dh 10y ago
FYI the author also offers an absurdly good commandline shellscript linter: https://github.com/koalaman/shellcheck https://github.com/koalaman/shellcheck
It's a bit like `checkbashisms` but a lot more expansive and with formal classification of the warnings.
- nodesocket 10y agoshellcheck is awesome. There is even a Sublime plugin SublimLinter-Shellcheck. Also, every rule in shellcheck has a corresponding github wiki page which describes the issues and common fixes. For example SC2002 (https://github.com/koalaman/shellcheck/wiki/SC2002 https://github.com/koalaman/shellcheck/wiki/SC2002)
- jrimbault 10y agoI used it (the linter + its wiki) last week to work on a bunch of related scripts, it was really helpful and even taught me some things about my bad habits.
- philipov 10y agoWoa, it's written in Haskell. Awesome! EDIT: "and requires 2GB of RAM to compile." whaaat?
- jessaustin 10y agoHaha I assumed the second observation was a result of the first? Still, this is why one uses a reasonable distro. When I "apt-get install shellcheck", a version that's just about a year old (0.3.7) gets installed. Let package maintainers worry about compiling Haskell.
- yjftsjthsd-h 10y agoI was about to comment that year-old software is a downside, but given that it's for (ba|)sh maybe not so much; bash changes but glacially, and sh has barely moved in 20 years. Stability for the win :)
- kasabali 10y agoI don't know where the RAM requirement come from. I've been compiling shellcheck on VPS's with less than a gig RAM for a year and never hit a memory issue.
- koala_man 10y agoI'm the author of the article and ShellCheck. The RAM requirement comes from my own experience, where I had to add a swap file to my VPS because 1.7GB RAM wasn't enough. I'm very surprised you've been getting by with less than a gig. What's your arch and GHC version, if you don't mind? Older GHC versions appeared to use significantly less RAM, and I imagine 32bit pointers would save a lot.
- kasabali 10y agoWow it's great to talk to you. Thanks for your great tool! Your guess is right, I do my builds in Debian 8 with ghc and cabal from the repository. I do cabal update before compilation but I don't think this upgrades the ghc so the details should be like: arch: i686 ghc: 7.6.3 I also use these arguments for cabal install but no idea if they affect anything: --disable-documentation --enable-split-objs --ghc-options='-static -optc-static -optl-static -optl-pthread'