./shells/shellcheck, Shell script analysis tool

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ]


Branch: CURRENT, Version: 0.12.0, Package name: shellcheck-0.12.0, Maintainer: drixter

ShellCheck - A shell script static analysis tool

ShellCheck is a GPLv3 tool that gives warnings and suggestions for
bash/sh shell scripts.

The goals of ShellCheck are:

* To point out and clarify typical beginner's syntax issues that cause
a shell to give cryptic error messages.

* To point out and clarify typical intermediate level semantic problems
that cause a shell to behave strangely and counter-intuitively.

* To point out subtle caveats, corner cases and pitfalls that may cause
an advanced user's otherwise working script to fail under future
circumstances.


Master sites:

Filesize: 254.84 KB

Version history: (Expand)


CVS history: (Expand)


   2026-12-03 11:01:51 by Marcin Gondek | Files touched by this commit (3)
Log message:
shellcheck: Update to version 0.12.0

CHANGELOG
v0.12.0 - 2026-12-02

Added
Add --files-from option to read input files from a file
Add --extended-analysis=local directive/flag to run dataflow analysis
on the current script only, without considering any sourced includes.
--list-optional now lists the SC error code for optional checks
Support EditorConfig shellcheck.* keys
SC2336: Suggest cp -R over implementation specific cp -r
SC2337: Warn about grep -q in pipelines under pipefail
SC2338: Optionally suggest [[ x == y ]] over [[ x = y ]]
(bash require-double-equals)
SC2339/SC2340/SC2341/SC3426: Improved exit/return validation across shells

Changed
SC2024/SC2232: sudo redirection/builtin now also apply to doas and run0
SC2114/SC2115: Unintentional rm warning now also triggers on globs like
rm /bin/*$empty* and non-canonical paths like rm -rf /home/foo/$empty/..
SC2236/SC2237: warning for negated -n/-z in [ ] now also triggers for test
SC2312: cmd || echo .. is now considered handling failure
SC3040: Support pipefail as specified in POSIX.1-2024

Fixed
|& now parses correctly as coprocess separator it Ksh
Malformed shebangs retain warnings, but are no longer counted as shebangs
json1 output no longer contains duplicates instances of warnings
SC1072 about an invalid disable= value now names the value instead
of a missing =
SC2031: No longer warns that assignments to _ may be lost in a subshell
SC2034: Unused variables no longer warn when allexport is enabled
SC2035: Unprotected globs no longer warn when noglob is enabled
SC2064: readonly variables no longer warn about expanding in trap
SC2147: Check for tilde in $PATH now also triggers for declare/local/export
SC2164: Status of cd is considered handled when returned from a function
SC2178: Overwriting built-in bash arrays no longer warns in non-bash shells
SC2185: find -files0-from no longer triggers check about missing path
SC2218: Won't trigger on bats tests invoking functions defined later
SC2317: No longer reports commands as unreachable when a case catch-all
is followed by ;;& and a non-default final clause
SC3001: busybox sh now considered to support <(process substitution)
SC3003: removed since ANSI C string is specified in POSIX.1-2024
   2026-11-13 15:40:08 by Masatake Daimon | Files touched by this commit (1267)
Log message:
Revbump for lang/ghc910
   2026-06-14 10:35:34 by Marcin Gondek | Files touched by this commit (2)
Log message:
shells/shellcheck: Update to v0.11.0

v0.11.0 - 2025-08-03
Added
SC2327/SC2328: Warn about capturing the output of redirected commands.
SC2329: Warn when (non-escaping) functions are never invoked.
SC2330: Warn about unsupported glob matches with [[ .. ]] in BusyBox.
SC2331: Suggest using standard -e instead of unary -a in tests.
SC2332: Warn about [ ! -o opt ] being unconditionally true in Bash.
SC3062: Warn about bashism [ -o opt ].
Optional avoid-negated-conditions: suggest replacing [ ! a -eq b ]
with [ a -ne b ], and similar for -ge/-lt/=/!=/etc (SC2335).
Precompiled binaries for Linux riscv64 (linux.riscv64)
Changed
SC2002 about Useless Use Of Cat is now disabled by default. It can be
re-enabled with --enable=useless-use-of-cat or equivalent directive.
SC2236/SC2237 about replacing [ ! -n .. ] with [ -z ] and vice versa
is now optional under avoid-negated-conditions.
SC2015 about A && B || C no longer triggers when B is a test command.
SC3012: Do not warn about \< and \> in test/[] as specified in POSIX.1-2024
Diff output now uses / as path separator on Windows
Fixed
SC2218 about function use-before-define is now more accurate.
SC2317 about unreachable commands is now less spammy for nested ones.
SC2292, optional suggestion for [[ ]], now triggers for Busybox.
Updates for Bash 5.3, including ${| cmd; } and source -p
Removed
SC3013: removed since the operators -ot/-nt/-ef are specified in POSIX.1-2024
   2025-08-13 13:07:47 by Masatake Daimon | Files touched by this commit (1263)
Log message:
Bump all Haskell because lang/ghc910 has got a library change
   2025-03-05 04:40:14 by Masatake Daimon | Files touched by this commit (1173)
Log message:
recursive revbump after patching lang/ghc910
   2025-02-02 14:06:08 by Masatake Daimon | Files touched by this commit (1173)
Log message:
Bump all Haskell packages after switching the default compiler.
   2025-02-01 15:52:36 by Masatake Daimon | Files touched by this commit (1)
Log message:
shells/shellcheck: Fix build with GHC 9.10
   2024-05-09 03:32:57 by Masatake Daimon | Files touched by this commit (1137)
Log message:
Recursive revbump after changing the default Haskell compiler