News for hackers. Stuff that matters.
Re:ShellCheck: a static analysis and linting tool for sh/bas... by anonfunction on Saturday December 20, 2014 @08:18PM (#8778605)
Cool tool but I'm really confused by the name choice. Sure choosing names is hard but by using a name of a common tool for an unrelated tool will just cause problems for people looking for bash spellcheck tools.
Re:ShellCheck: a static analysis and linting tool for sh/bas... by koala_man on Saturday December 20, 2014 @09:38PM (#8778776)
I'm the author! Since naming the tool, I've discovered that a significant segment of the population (such as yourself) repeatedly misread the name as "spellcheck".

The name is actually "shellcheck" (shell + check).

It's a fascinating effect because people seem to be very consistent in whether they read it one way or the other. If linguists don't already have a name for this sharp, binary classification, I propose "n-Gram staining".

Re:ShellCheck: a static analysis and linting tool for sh/bas... by uaygsfdbzf on Saturday December 20, 2014 @11:51PM (#8778976)
Some ideas for the future:

Add support for the Firehose XML output format:

https://github.com/fedora-static-analysis/firehose

Checks for features that are specific to one shell (bashisms etc) when used with POSIX #!/bin/sh.

Checks for features that aren't implemented in the desired shell (for running on busybox sh for example).

Check for the various issues listed here:

http://mywiki.wooledge.org/BashPitfalls

Re:ShellCheck: a static analysis and linting tool for sh/bas... by koala_man on Sunday December 21, 2014 @03:59AM (#8779332)
Thanks!

ShellCheck already checks for bashism if the script is declared with #!/bin/sh, and finds most of the ones that checkbashisms does along with a few others. It's geared towards POSIX compliance though, and doesn't know which non-POSIX feature are available in e.g. busybox sh.

There is also some limited support for warning about features not available between non-POSIX shells, such as trying to use zsh =(temp files) in bash or bash ;;& case continuations in zsh, but this isn't as much of a focus as POSIX checks since it's not a common source of issues.

The Wooledge pitfall list was the original implementation checklist. About 38 out of the 46 are already covered in one form or another.

I haven't heard of Firehose before, but if you want to use it right now you can run shellcheck with -f gcc, to get gcc style error messages that Firehose can already parse.

Re:ShellCheck: a static analysis and linting tool for sh/bas... by tach4n on Sunday December 21, 2014 @03:53AM (#8779324)
Yes, I experienced this as well.

The way the human brain works is crazy. You take the very very strong expectation of reading "spellcheck", and then you swap out a "p" for something that looks a lot like an upside-down "p"...and it refuses to read it as anything else.

Re:ShellCheck: a static analysis and linting tool for sh/bas... by anonfunction on Monday December 22, 2014 @01:39AM (#8782260)
Thanks for clearing that up for me, I was reading it as "spellcheck" the whole time!
Re:ShellCheck: a static analysis and linting tool for sh/bas... by agumonkey on Saturday December 20, 2014 @08:20PM (#8778611)
Looks like a pun on the shellshock bug.
Re:ShellCheck: a static analysis and linting tool for sh/bas... by Hello71 on Saturday December 20, 2014 @08:28PM (#8778634)
shellcheck is significantly older than shellshock, in terms of naming date anyways.

https://github.com/koalaman/shellcheck