Skip to content
koalaman edited this page Sep 15, 2017 · 2 revisions

Ash scripts will be checked as Dash. Add '# shellcheck shell=dash' to silence.

Problematic code:

#!/bin/ash
echo "Hello World"

Correct code:

#!/bin/ash
# shellcheck shell=dash
echo "Hello World"

Rationale:

ShellCheck has no first class support for ash, but it does support its Debian fork dash and defaults to this whenever ash is specified.

Unfortunately, while the two are similar, they are not completely compatible. For example, ash supports echo -e but dash does not, so ShellCheck will incorrectly warn about it.

You can use a directive to let ShellCheck know you're aware of this problem.

Exceptions:

None.

ShellCheck

Each individual ShellCheck warning has its own wiki page like SC1000. Use GitHub Wiki's "Pages" feature above to find a specific one, or see Checks.

Clone this wiki locally
You can’t perform that action at this time.