ShellCheck v0.7.2 Release Notes

Release Date: 2021-04-19 // about 3 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