All Versions
24
Latest Version
Avg Release Cycle
123 days
Latest Release
272 days ago

Changelog History
Page 1

  • v0.7.2 Changes

    April 19, 2021

    โž• Added

    • disable directives can now be a range, e.g. disable=SC3000-SC4000
    • SC1143: Warn about line continuations in comments
    • SC2259/SC2260: Warn when redirections override pipes
    • SC2261: Warn about multiple competing redirections
    • ๐Ÿ“œ SC2262/SC2263: Warn about aliases declared and used in the same parsing unit
    • SC2264: Warn about wrapper functions that blatantly recurse
    • โœ… SC2265/SC2266: Warn when using & or | with test statements
    • SC2267: Warn when using xargs -i instead of -I
    • SC2268: Warn about unnecessary x-comparisons like [ x$var = xval ]

    ๐Ÿ›  Fixed

    • ๐Ÿ“œ SC1072/SC1073 now respond to disable annotations, though ignoring parse errors is still purely cosmetic and does not allow ShellCheck to continue.
    • ๐Ÿ‘Œ Improved error reporting for trailing tokens after ]/]] and compound commands
    • #!/usr/bin/env -S shell is now handled correctly
    • โš  Here docs with \r are now parsed correctly and give better warnings

    ๐Ÿ”„ Changed

    • ๐Ÿ“œ Assignments are now parsed to spec, without leniency for leading $ or spaces
    • โš  POSIX/dash unsupported feature warnings now have individual SC3xxx codes
    • SC1090: A leading $x/ or $(x)/ is now treated as ./ when locating files
    • โœ… SC2154: Variables appearing in -z/-n tests are no longer considered unassigned
    • โš  SC2270-SC2285: Improved warnings about misused =, e.g. ${var}=42
  • v0.7.1 Changes

    April 04, 2020

    ๐Ÿ›  Fixed

    • -f diff no longer claims that it found more issues when it didn't
    • Known empty variables now correctly trigger SC2086
    • ShellCheck should now be compatible with Cabal 3
    • SC2154 and all command-specific checks now trigger for builtins called with builtin

    โž• Added

    • SC1136: Warn about unexpected characters after ]/]]
    • SC2254: Suggest quoting expansions in case statements
    • SC2255: Suggest using $((..)) in [ 2*3 -eq 6 ]
    • SC2256: Warn about translated strings that are known variables
    • SC2257: Warn about arithmetic mutation in redirections
    • SC2258: Warn about trailing commas in for loop elements

    ๐Ÿ”„ Changed

    • ๐Ÿ—„ SC2230: 'command -v' suggestion is now off by default (-i deprecate-which)
    • โš  SC1081: Keywords are now correctly parsed case sensitively, with a warning
  • v0.7.0 Changes

    July 28, 2019

    โž• Added

    • ๐ŸŽ Precompiled binaries for macOS and Linux aarch64
    • ๐Ÿ‘ Preliminary support for fix suggestions
    • ๐Ÿ†• New -f diff unified diff format for auto-fixes
    • โœ… Files containing Bats tests can now be checked
    • Directory wide directives can now be placed in a .shellcheckrc
    • โœ… Optional checks: Use --list-optional to show a list of tests, Enable with -o flags or enable=name directives
    • Source paths: Use -P dir1:dir2 or a source-path=dir1 directive to specify search paths for sourced files.
    • json1 format like --format=json but treats tabs as single characters
    • Recognize FLAGS variables created by the shflags library.
    • Site-specific changes can now be made in Custom.hs for ease of patching
    • SC2154: Also warn about unassigned uppercase variables (optional)
    • SC2252: Warn about [ $a != x ] || [ $a != y ], similar to SC2055
    • SC2251: Inform about ineffectual ! in front of commands
    • SC2250: Warn about variable references without braces (optional)
    • 0๏ธโƒฃ SC2249: Warn about case with missing default case (optional)
    • SC2248: Warn about unquoted variables without special chars (optional)
    • SC2247: Warn about $"(cmd)" and $"{var}"
    • SC2246: Warn if a shebang's interpreter ends with /
    • SC2245: Warn that Ksh ignores all but the first glob result in [
    • SC2243/SC2244: Suggest using explicit -n for [ $foo ] (optional)
    • SC1135: Suggest not ending double quotes just to make $ literal

    ๐Ÿ”„ Changed

    • If a directive or shebang is not specified, a .bash/.bats/.dash/.ksh extension will be used to infer the shell type when present.
    • Disabling SC2120 on a function now disables SC2119 on call sites

    ๐Ÿ›  Fixed

    • ๐Ÿ–จ SC2183 no longer warns about missing printf args for %()T
  • v0.6.0 Changes

    December 02, 2018

    โž• Added

    • ๐Ÿ’ป Command line option --severity/-S for filtering by minimum severity
    • ๐Ÿ’ป Command line option --wiki-link-count/-W for showing wiki links
    • SC2152/SC2151: Warn about bad exit values like 1234 and "foo"
    • SC2236/SC2237: Suggest -n/-z instead of ! -z/-n
    • SC2238: Warn when redirecting to a known command name, e.g. ls > rm
    • SC2239: Warn if the shebang is not an absolute path, e.g. #!bin/sh
    • SC2240: Warn when passing additional arguments to dot (.) in sh/dash
    • ๐Ÿ‘ SC1133: Better diagnostics when starting a line with |/||/&&

    ๐Ÿ”„ Changed

    • โš  Most warnings now have useful end positions
    • SC1117 about unknown double-quoted escape sequences has been retired

    ๐Ÿ›  Fixed

    • SC2021 no longer triggers for equivalence classes like [=e=]
    • SC2221/SC2222 no longer mistriggers on fall-through case branches
    • SC2081 about glob matches in [ .. ] now also triggers for !=
    • SC2086 no longer warns about spaces in $#
    • SC2164 no longer suggests subshells for cd ..; cmd; cd ..
    • read -a is now correctly considered an array assignment
    • SC2039 no longer warns about LINENO now that it's POSIX
  • v0.5.0 Changes

    May 31, 2018

    โž• Added

    • โœ… SC2233/SC2234/SC2235: Suggest removing or replacing (..) around tests
    • SC2232: Warn about invalid arguments to sudo
    • SC2231: Suggest quoting expansions in for loop globs
    • SC2229: Warn about 'read $var'
    • SC2227: Warn about redirections in the middle of 'find' commands
    • SC2224/SC2225/SC2226: Warn when using mv/cp/ln without a destination
    • โš  SC2223: Quote warning specific to : ${var=value}
    • SC1131: Warn when using elseif or elsif
    • SC1128: Warn about blanks/comments before shebang
    • ๐Ÿ’… SC1127: Warn about C-style comments

    ๐Ÿ›  Fixed

    • Annotations intended for a command's here documents now work
    • ๐Ÿ“œ Escaped characters inside groups in =~ regexes now parse
    • Associative arrays are now respected in arithmetic contexts
    • SC1087 about $var[@] now correctly triggers on any index
    • Bad expansions in here documents are no longer ignored
    • ๐Ÿšš FD move operations like {fd}>1- now parse correctly

    ๐Ÿ”„ Changed

    • ๐Ÿ“„ Here docs are now terminated as per spec, rather than by presumed intent
    • ๐Ÿ“œ SC1073: 'else if' is now parsed correctly and not like 'elif'
    • SC2163: 'export $name' can now be silenced with 'export ${name?}'
    • ๐Ÿ–จ SC2183: Now warns when printf arg count is not a multiple of format count
  • v0.4.7 Changes

    December 08, 2017

    โž• Added

    • ๐Ÿง Statically linked binaries for Linux and Windows (see README.md)!
    • โš  -a flag to also include warnings in sourced files
    • SC2221/SC2222: Warn about overridden case branches
    • SC2220: Warn about unhandled error cases in getopt loops
    • SC2218: Warn when using functions before they're defined
    • SC2216/SC2217: Warn when piping/redirecting to mv/cp and other non-readers
    • SC2215: Warn about commands starting with leading dash
    • SC2214: Warn about superfluous getopt flags
    • SC2213: Warn about unhandled getopt flags
    • SC2212: Suggest false over [ ]
    • SC2211: Warn when using a glob as a command name
    • SC2210: Warn when redirecting to an integer, e.g. foo 1>2
    • SC2206/SC2207: Suggest alternatives when using word splitting in arrays
    • SC1117: Warn about double quoted, undefined backslash sequences
    • SC1113/SC1114/SC1115: Recognized more malformed shebangs

    ๐Ÿ›  Fixed

    • [ -v foo ] no longer warns if foo is undefined
    • SC2037 is now suppressed by quotes, e.g. PAGER="cat" man foo
    • ๐Ÿ“œ Ksh nested array declarations now parse correctly
    • Parameter Expansion without colons are now recognized, e.g. ${foo+bar}
    • โš  The lastpipe option is now respected with regard to subshell warnings
    • \( is now respected for grouping in [
    • Leading \ is now ignored for commands, to allow alias suppression
    • Comments are now allowed after directives to e.g. explain 'disable'
  • v0.4.6 Changes

    March 26, 2017

    โž• Added

    • SC2204/SC2205: Warn about ( -z foo ) and ( foo -eq bar )
    • SC2200/SC2201: Warn about brace expansion in [/[[
    • SC2198/SC2199: Warn about arrays in [/[[
    • ๐Ÿ—„ SC2196/SC2197: Warn about deprecated egrep/fgrep
    • SC2195: Warn about unmatchable case branches
    • SC2194: Warn about constant 'case' statements
    • SC2193: Warn about [[ file.png == *.mp3 ]] and other unmatchables
    • SC2188/SC2189: Warn about redirections without commands
    • ๐Ÿ—„ SC2186: Warn about deprecated tempfile
    • SC1109: Warn when finding &/>/< unquoted
    • SC1108: Warn about missing spaces in [ var= foo ]

    ๐Ÿ”„ Changed

    • All files are now read as UTF-8 with lenient latin1 fallback, ignoring locale
    • Unicode quotes are no longer considered syntactic quotes
    • โš  ash scripts will now be checked as dash with a warning

    ๐Ÿ›  Fixed

    • -c no longer suggested when using grep -o | wc
    • Comments and whitespace are now allowed before filewide directives
    • Here doc delimiters with esoteric quoting like foo"" are now handled
    • SC2095 about ssh in while read loops is now suppressed when using -n
    • ๐Ÿ–จ %(%Y%M%D)T now recognized as a single formatter in printf checks
    • grep -F now suppresses regex related suggestions
    • Command name checks now recognize busybox applet names
  • v0.4.5 Changes

    October 21, 2016

    โž• Added

    • ๐Ÿ— A Docker build (thanks, kpankonen!)
    • SC2185: Suggest explicitly adding path for find
    • SC2184: Warn about unsetting globs (e.g. unset foo[1])
    • ๐Ÿ–จ SC2183: Warn about printf with more formatters than variables
    • ๐Ÿ–จ SC2182: Warn about ignored arguments with printf
    • SC2181: Suggest using command directly instead of if [ $? -eq 0 ]
    • โœ… SC1106: Warn when using test operators in (( 1 -eq 2 ))

    ๐Ÿ”„ Changed

    • โš  Unrecognized directives now causes a warning rather than parse failure.

    ๐Ÿ›  Fixed

    • ๐Ÿ“œ Indices in associative arrays are now parsed correctly
    • โš  Missing shebang warning squashed when specifying with a directive
    • ๐Ÿ‘ Ksh multidimensional arrays are now supported
    • Variables in substring ${a:x:y} expansions now count as referenced
    • SC1102 now also handles ambiguous $((
    • Using $(seq ..) will no longer suggest quoting
    • SC2148 (missing shebang) is now suppressed when using shell directives
    • [ a '>' b ] is now recognized as being correctly escaped
  • v0.4.4 Changes

    May 15, 2016

    โž• Added

    • ๐Ÿ‘ Haskell Stack support (thanks, Arguggi!)
    • SC2179/SC2178: Warn when assigning/appending strings to arrays
    • SC1102: Warn about ambiguous $(((
    • SC1101: Warn when \ linebreaks have trailing spaces

    ๐Ÿ”„ Changed

    • Directives directly after the shebang now apply to the entire file

    ๐Ÿ›  Fixed

    • {$i..10} is now flagged similar to {1..$i}
  • v0.4.3 Changes

    January 13, 2016

    ๐Ÿ›  This is purely a bugfix bump that works on GHC 7.6.3,
    as currently found in Debian stable and Ubuntu LTS.