diff options
author B. Watson <>2020-09-22 22:46:27 -0400
committer Willy Sudiarto Raharjo <>2020-09-26 16:10:59 +0700
commita0e2b49a6aa473317ee2240f0c57f938cd4a8a29 (patch)
parent5827c018b6a9c72ccdd16df731805bb7c45a315e (diff)
development/ShellCheck-bin: Updated for version 0.7.1.
Signed-off-by: B. Watson <> Signed-off-by: Willy Sudiarto Raharjo <>
4 files changed, 419 insertions, 15 deletions
diff --git a/development/ShellCheck-bin/README b/development/ShellCheck-bin/README
index b3e4214db4..5510f43939 100644
--- a/development/ShellCheck-bin/README
+++ b/development/ShellCheck-bin/README
@@ -5,4 +5,4 @@ on the website.
This is a repackage of the 64 bit binary supplied by upstream.
To build ShellCheck from source, see haskell/haskell-ShellCheck.
-This binary was compiled on Fri Jun 1 03:48:26 UTC 2018.
+This binary was compiled on Sun Apr 5 01:56:58 UTC 2020.
diff --git a/development/ShellCheck-bin/ShellCheck-bin.SlackBuild b/development/ShellCheck-bin/ShellCheck-bin.SlackBuild
index cd036f10e4..bafddd7f8e 100644
--- a/development/ShellCheck-bin/ShellCheck-bin.SlackBuild
+++ b/development/ShellCheck-bin/ShellCheck-bin.SlackBuild
@@ -23,9 +23,7 @@
@@ -52,10 +50,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-tar xvf $CWD/$BINNAM-$SRCVERSION.linux.$ARCH.tar.xz
-tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+tar xvf $CWD/$BINNAM-v$VERSION.linux.$ARCH.tar.xz
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -64,8 +61,17 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
install -D -m 0755 $BINNAM $PKG/usr/bin/$BINNAM
-install -D -m 0644 $SRCNAM-$VERSION/$BINNAM.1.gz $PKG/usr/man/man1/$BINNAM.1.gz
+# 20200922 bkw: man page originally came from:
+# We can't use the shellcheck source any more, it no longer ships the
+# man page: it now uses pandoc to generate the man page. We don't make
+# this build depend on pandoc because it has 138 (!) dependencies.
+# Since the man page is pretty small, I just extracted it from the
+# Debian package and added it to our git repo.
+mkdir -p $PKG/usr/man/man1
+gzip -9c < $CWD/$BINNAM.1 > $PKG/usr/man/man1/$BINNAM.1.gz
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
diff --git a/development/ShellCheck-bin/ b/development/ShellCheck-bin/
index bdd3963214..62d1f598e6 100644
--- a/development/ShellCheck-bin/
+++ b/development/ShellCheck-bin/
@@ -1,12 +1,10 @@
-DOWNLOAD_x86_64=" \
-MD5SUM_x86_64="fdf17479619fd50b909e44b2ad800b76 \
- 570c665dc89d31c5a4e25d52c5790eaf"
MAINTAINER="Dave Woodfall"
diff --git a/development/ShellCheck-bin/shellcheck.1 b/development/ShellCheck-bin/shellcheck.1
new file mode 100644
index 0000000000..b98de14a65
--- /dev/null
+++ b/development/ShellCheck-bin/shellcheck.1
@@ -0,0 +1,400 @@
+.\" Automatically generated by Pandoc 2.5
+.TH "SHELLCHECK" "1" "" "Shell script analysis tool" ""
+shellcheck \- Shell script analysis tool
+\f[B]shellcheck\f[R] [\f[I]OPTIONS\f[R]\&...] \f[I]FILES\f[R]\&...
+ShellCheck is a static analysis and linting tool for sh/bash scripts.
+It\[cq]s mainly focused on handling typical beginner and intermediate
+level syntax errors and pitfalls where the shell just gives a cryptic
+error message or strange behavior, but it also reports on a few more
+advanced issues where corner cases can cause delayed failures.
+ShellCheck gives shell specific advice.
+Consider this line:
+(( area = 3.14*r*r ))
+.IP \[bu] 2
+For scripts starting with \f[C]#!/bin/sh\f[R] (or when using
+\f[C]\-s sh\f[R]), ShellCheck will warn that \f[C](( .. ))\f[R] is not
+POSIX compliant (similar to checkbashisms).
+.IP \[bu] 2
+For scripts starting with \f[C]#!/bin/bash\f[R] (or using
+\f[C]\-s bash\f[R]), ShellCheck will warn that decimals are not
+.IP \[bu] 2
+For scripts starting with \f[C]#!/bin/ksh\f[R] (or using
+\f[C]\-s ksh\f[R]), ShellCheck will not warn at all, as \f[C]ksh\f[R]
+supports decimals in arithmetic contexts.
+.B \f[B]\-a\f[R],\ \f[B]\[en]check\-sourced\f[R]
+Emit warnings in sourced files.
+Normally, \f[C]shellcheck\f[R] will only warn about issues in the
+specified files.
+With this option, any issues in sourced files will also be reported.
+.B \f[B]\-C\f[R][\f[I]WHEN\f[R]],\ \f[B]\[en]color\f[R][=\f[I]WHEN\f[R]]
+For TTY output, enable colors \f[I]always\f[R], \f[I]never\f[R] or
+The default is \f[I]auto\f[R].
+\f[B]\[en]color\f[R] without an argument is equivalent to
+.B \f[B]\-i\f[R]\ \f[I]CODE1\f[R][,\f[I]CODE2\f[R]\&...],\ \f[B]\[en]include=\f[R]\f[I]CODE1\f[R][,\f[I]CODE2\f[R]\&...]
+Explicitly include only the specified codes in the report.
+Subsequent \f[B]\-i\f[R] options are cumulative, but all the codes can
+be specified at once, comma\-separated as a single argument.
+Include options override any provided exclude options.
+.B \f[B]\-e\f[R]\ \f[I]CODE1\f[R][,\f[I]CODE2\f[R]\&...],\ \f[B]\[en]exclude=\f[R]\f[I]CODE1\f[R][,\f[I]CODE2\f[R]\&...]
+Explicitly exclude the specified codes from the report.
+Subsequent \f[B]\-e\f[R] options are cumulative, but all the codes can
+be specified at once, comma\-separated as a single argument.
+.B \f[B]\-f\f[R] \f[I]FORMAT\f[R], \f[B]\[en]format=\f[R]\f[I]FORMAT\f[R]
+Specify the output format of shellcheck, which prints its results in the
+standard output.
+Subsequent \f[B]\-f\f[R] options are ignored, see \f[B]FORMATS\f[R]
+below for more information.
+.B \f[B]\[en]list\-optional\f[R]
+Output a list of known optional checks.
+These can be enabled with \f[B]\-o\f[R] flags or \f[B]enable\f[R]
+.B \f[B]\[en]norc\f[R]
+Don\[cq]t try to look for .shellcheckrc configuration files.
+.B \f[B]\-o\f[R]\ \f[I]NAME1\f[R][,\f[I]NAME2\f[R]\&...],\ \f[B]\[en]enable=\f[R]\f[I]NAME1\f[R][,\f[I]NAME2\f[R]\&...]
+Enable optional checks.
+The special name \f[I]all\f[R] enables all of them.
+Subsequent \f[B]\-o\f[R] options accumulate.
+This is equivalent to specifying \f[B]enable\f[R] directives.
+.B \f[B]\-P\f[R]\ \f[I]SOURCEPATH\f[R],\ \f[B]\[en]source\-path=\f[R]\f[I]SOURCEPATH\f[R]
+Specify paths to search for sourced files, separated by \f[C]:\f[R] on
+Unix and \f[C];\f[R] on Windows.
+This is equivalent to specifying \f[C]search\-path\f[R] directives.
+.B \f[B]\-s\f[R]\ \f[I]shell\f[R],\ \f[B]\[en]shell=\f[R]\f[I]shell\f[R]
+Specify Bourne shell dialect.
+Valid values are \f[I]sh\f[R], \f[I]bash\f[R], \f[I]dash\f[R] and
+The default is to deduce the shell from the file\[cq]s \f[C]shell\f[R]
+directive, shebang, or \f[C].bash/.bats/.dash/.ksh\f[R] extension, in
+that order.
+\f[I]sh\f[R] refers to POSIX \f[C]sh\f[R] (not the system\[cq]s), and
+will warn of portability issues.
+.B \f[B]\-S\f[R]\ \f[I]SEVERITY\f[R],\ \f[B]\[en]severity=\f[R]\f[I]severity\f[R]
+Specify minimum severity of errors to consider.
+Valid values in order of severity are \f[I]error\f[R],
+\f[I]warning\f[R], \f[I]info\f[R] and \f[I]style\f[R].
+The default is \f[I]style\f[R].
+.B \f[B]\-V\f[R],\ \f[B]\[en]version\f[R]
+Print version information and exit.
+.B \f[B]\-W\f[R] \f[I]NUM\f[R],\ \f[B]\[en]wiki\-link\-count=NUM\f[R]
+For TTY output, show \f[I]NUM\f[R] wiki links to more information about
+mentioned warnings.
+Set to 0 to disable them entirely.
+.B \f[B]\-x\f[R],\ \f[B]\[en]external\-sources\f[R]
+Follow \f[C]source\f[R] statements even when the file is not specified
+as input.
+By default, \f[C]shellcheck\f[R] will only follow files specified on the
+command line (plus \f[C]/dev/null\f[R]).
+This option allows following any file the script may \f[C]source\f[R].
+.B \f[B]FILES\&...\f[R]
+One or more script files to check, or \[lq]\-\[rq] for standard input.
+.B \f[B]tty\f[R]
+Plain text, human readable output.
+This is the default.
+.B \f[B]gcc\f[R]
+GCC compatible output.
+Useful for editors that support compiling and showing syntax errors.
+For example, in Vim,
+\f[C]:set makeprg=shellcheck\[rs] \-f\[rs] gcc\[rs] %\f[R] will allow
+using \f[C]:make\f[R] to check the script, and \f[C]:cnext\f[R] to jump
+to the next error.
+<file>:<line>:<column>: <type>: <message>
+.B \f[B]checkstyle\f[R]
+Checkstyle compatible XML output.
+Supported directly or through plugins by many IDEs and build monitoring
+<?xml version=\[aq]1.0\[aq] encoding=\[aq]UTF\-8\[aq]?>
+<checkstyle version=\[aq]4.3\[aq]>
+ <file name=\[aq]file\[aq]>
+ <error
+ line=\[aq]line\[aq]
+ column=\[aq]column\[aq]
+ severity=\[aq]severity\[aq]
+ message=\[aq]message\[aq]
+ source=\[aq]ShellCheck.SC####\[aq] />
+ ...
+ </file>
+ ...
+.B \f[B]diff\f[R]
+Auto\-fixes in unified diff format.
+Can be piped to \f[C]git apply\f[R] or \f[C]patch \-p1\f[R] to
+automatically apply fixes.
+\-\-\- a/
++++ b/
+\[at]\[at] \-2,6 +2,6 \[at]\[at]
+ ## Example of a broken script.
+ for f in $(ls *.m3u)
+ do
+\- grep \-qi hq.*mp3 $f \[rs]
++ grep \-qi hq.*mp3 \[dq]$f\[dq] \[rs]
+ && echo \-e \[aq]Playlist $f contains a HQ file in mp3 format\[aq]
+ done
+.B \f[B]json1\f[R]
+Json is a popular serialization format that is more suitable for web
+ShellCheck\[cq]s json is compact and contains only the bare minimum.
+Tabs are counted as 1 character.
+ comments: [
+ {
+ \[dq]file\[dq]: \[dq]filename\[dq],
+ \[dq]line\[dq]: lineNumber,
+ \[dq]column\[dq]: columnNumber,
+ \[dq]level\[dq]: \[dq]severitylevel\[dq],
+ \[dq]code\[dq]: errorCode,
+ \[dq]message\[dq]: \[dq]warning message\[dq]
+ },
+ ...
+ ]
+.B \f[B]json\f[R]
+This is a legacy version of the \f[B]json1\f[R] format.
+It\[cq]s a raw array of comments, and all offsets have a tab stop of 8.
+.B \f[B]quiet\f[R]
+Suppress all normal output.
+Exit with zero if no issues are found, otherwise exit with one.
+Stops processing after the first issue.
+ShellCheck directives can be specified as comments in the shell script.
+If they appear before the first command, they are considered file\-wide.
+Otherwise, they apply to the immediately following command or block:
+# shellcheck key=value key=value
+For example, to suppress SC2035 about using \f[C]./*.jpg\f[R]:
+# shellcheck disable=SC2035
+echo \[dq]Files: \[dq] *.jpg
+To tell ShellCheck where to look for an otherwise dynamically determined
+# shellcheck source=./
+source \[dq]$(find_install_dir)/\[dq]
+Here a shell brace group is used to suppress a warning on multiple
+# shellcheck disable=SC2016
+ echo \[aq]Modifying $PATH\[aq]
+ echo \[aq]PATH=foo:$PATH\[aq] >> \[ti]/.bashrc
+Valid keys are:
+.B \f[B]disable\f[R]
+Disables a comma separated list of error codes for the following
+The command can be a simple command like \f[C]echo foo\f[R], or a
+compound command like a function definition, subshell block or loop.
+.B \f[B]enable\f[R]
+Enable an optional check by name, as listed with
+Only file\-wide \f[C]enable\f[R] directives are considered.
+.B \f[B]source\f[R]
+Overrides the filename included by a \f[C]source\f[R]/\f[C].\f[R]
+This can be used to tell shellcheck where to look for a file whose name
+is determined at runtime, or to skip a source by telling it to use
+.B \f[B]source\-path\f[R]
+Add a directory to the search path for \f[C]source\f[R]/\f[C].\f[R]
+statements (by default, only ShellCheck\[cq]s working directory is
+Absolute paths will also be rooted in these paths.
+The special path \f[C]SCRIPTDIR\f[R] can be used to specify the
+currently checked script\[cq]s directory, as in
+\f[C]source\-path=SCRIPTDIR\f[R] or
+Multiple paths accumulate, and \f[C]\-P\f[R] takes precedence over them.
+.B \f[B]shell\f[R]
+Overrides the shell detected from the shebang.
+This is useful for files meant to be included (and thus lacking a
+shebang), or possibly as a more targeted alternative to `disable=2039'.
+Unless \f[C]\-\-norc\f[R] is used, ShellCheck will look for a file
+\f[C].shellcheckrc\f[R] or \f[C]shellcheckrc\f[R] in the script\[cq]s
+directory and each parent directory.
+If found, it will read \f[C]key=value\f[R] pairs from it and treat them
+as file\-wide directives.
+Here is an example \f[C].shellcheckrc\f[R]:
+# Look for \[aq]source\[aq]d files relative to the checked script,
+# and also look for absolute paths in /mnt/chroot
+# Turn on warnings for unquoted variables with safe values
+# Turn on warnings for unassigned uppercase variables
+# Allow [ ! \-z foo ] instead of suggesting \-n
+If no \f[C].shellcheckrc\f[R] is found in any of the parent directories,
+ShellCheck will look in \f[C]\[ti]/.shellcheckrc\f[R] followed by the
+XDG config directory (usually \f[C]\[ti]/.config/shellcheckrc\f[R]) on
+Unix, or \f[C]%APPDATA%/shellcheckrc\f[R] on Windows.
+Only the first file found will be used.
+Note for Snap users: the Snap sandbox disallows access to hidden files.
+Use \f[C]shellcheckrc\f[R] without the dot instead.
+Note for Docker users: ShellCheck will only be able to look for files
+that are mounted in the container, so \f[C]\[ti]/.shellcheckrc\f[R] will
+not be read.
+The environment variable \f[C]SHELLCHECK_OPTS\f[R] can be set with
+default flags:
+export SHELLCHECK_OPTS=\[aq]\-\-shell=bash \-\-exclude=SC2016\[aq]
+Its value will be split on spaces and prepended to the command line on
+each invocation.
+ShellCheck uses the following exit codes:
+.IP \[bu] 2
+0: All files successfully scanned with no issues.
+.IP \[bu] 2
+1: All files successfully scanned with some issues.
+.IP \[bu] 2
+2: Some files could not be processed (e.g.\ file not found).
+.IP \[bu] 2
+3: ShellCheck was invoked with bad syntax (e.g.\ unknown flag).
+.IP \[bu] 2
+4: ShellCheck was invoked with bad options (e.g.\ unknown formatter).
+This version of ShellCheck is only available in English.
+All files are leniently decoded as UTF\-8, with a fallback of
+ISO\-8859\-1 for invalid sequences.
+\f[C]LC_CTYPE\f[R] is respected for output, and defaults to UTF\-8 for
+locales where encoding is unspecified (such as the \f[C]C\f[R] locale).
+Windows users seeing
+\f[C]commitBuffer: invalid argument (invalid character)\f[R] should set
+their terminal to use UTF\-8 with \f[C]chcp 65001\f[R].
+ShellCheck is developed and maintained by Vidar Holen, with assistance
+from a long list of wonderful contributors.
+Bugs and issues can be reported on GitHub:
+Copyright 2012\-2019, Vidar Holen and contributors.
+Licensed under the GNU General Public License version 3 or later, see
+sh(1) bash(1)