ShellCheck v0.7.2 Release Notes
Release Date: 2021-04-19 // about 4 years ago-
โ 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