|
| 1 | +## Latest - ??? |
| 2 | +### Added |
| 3 | +- Statically linked binaries for Linux and Windows (see README.md)! |
| 4 | +- `-a` flag to also include warnings in `source`d files |
| 5 | +- SC2221/SC2222: Warn about overridden case branches |
| 6 | +- SC2220: Warn about unhandled error cases in getopt loops |
| 7 | +- SC2218: Warn when using functions before they're defined |
| 8 | +- SC2216/SC2217: Warn when piping/redirecting to mv/cp and other non-readers |
| 9 | +- SC2215: Warn about commands starting with leading dash |
| 10 | +- SC2214: Warn about superfluous getopt flags |
| 11 | +- SC2213: Warn about unhandled getopt flags |
| 12 | +- SC2212: Suggest `false` over `[ ]` |
| 13 | +- SC2211: Warn when using a glob as a command name |
| 14 | +- SC2210: Warn when redirecting to an integer, e.g. `foo 1>2` |
| 15 | +- SC2206/SC2207: Suggest alternatives when using word splitting in arrays |
| 16 | +- SC1117: Warn about double quoted, undefined backslash sequences |
| 17 | +- SC1113/SC1114/SC1115: Recognized more malformed shebangs |
| 18 | + |
| 19 | +### Fixed |
| 20 | +- `[ -v foo ]` no longer warns if `foo` is undefined |
| 21 | +- SC2037 is now suppressed by quotes, e.g. `PAGER="cat" man foo` |
| 22 | +- Ksh nested array declarations now parse correctly |
| 23 | +- Parameter Expansion without colons are now recognized, e.g. `${foo+bar}` |
| 24 | +- The `lastpipe` option is now respected with regard to subshell warnings |
| 25 | +- `\(` is now respected for grouping in `[` |
| 26 | +- Leading `\` is now ignored for commands, to allow alias suppression |
| 27 | +- Comments are now allowed after directives to e.g. explain 'disable' |
| 28 | + |
| 29 | + |
| 30 | +## v0.4.6 - 2017-03-26 |
| 31 | +### Added |
| 32 | +- SC2204/SC2205: Warn about `( -z foo )` and `( foo -eq bar )` |
| 33 | +- SC2200/SC2201: Warn about brace expansion in [/[[ |
| 34 | +- SC2198/SC2199: Warn about arrays in [/[[ |
| 35 | +- SC2196/SC2197: Warn about deprected egrep/fgrep |
| 36 | +- SC2195: Warn about unmatchable case branches |
| 37 | +- SC2194: Warn about constant 'case' statements |
| 38 | +- SC2193: Warn about `[[ file.png == *.mp3 ]]` and other unmatchables |
| 39 | +- SC2188/SC2189: Warn about redirections without commands |
| 40 | +- SC2186: Warn about deprecated `tempfile` |
| 41 | +- SC1109: Warn when finding `&`/`>`/`<` unquoted |
| 42 | +- SC1108: Warn about missing spaces in `[ var= foo ]` |
| 43 | + |
| 44 | +### Changed |
| 45 | +- All files are now read as UTF-8 with lenient latin1 fallback, ignoring locale |
| 46 | +- Unicode quotes are no longer considered syntactic quotes |
| 47 | +- `ash` scripts will now be checked as `dash` with a warning |
| 48 | + |
| 49 | +### Fixed |
| 50 | +- `-c` no longer suggested when using `grep -o | wc` |
| 51 | +- Comments and whitespace are now allowed before filewide directives |
| 52 | +- Here doc delimters with esoteric quoting like `foo""` are now handled |
| 53 | +- SC2095 about `ssh` in while read loops is now suppressed when using `-n` |
| 54 | +- `%(%Y%M%D)T` now recognized as a single formatter in `printf` checks |
| 55 | +- `grep -F` now suppresses regex related suggestions |
| 56 | +- Command name checks now recognize busybox applet names |
| 57 | + |
| 58 | + |
| 59 | +## v0.4.5 - 2016-10-21 |
| 60 | +### Added |
| 61 | +- A Docker build (thanks, kpankonen!) |
| 62 | +- SC2185: Suggest explicitly adding path for `find` |
| 63 | +- SC2184: Warn about unsetting globs (e.g. `unset foo[1]`) |
| 64 | +- SC2183: Warn about `printf` with more formatters than variables |
| 65 | +- SC2182: Warn about ignored arguments with `printf` |
| 66 | +- SC2181: Suggest using command directly instead of `if [ $? -eq 0 ]` |
| 67 | +- SC1106: Warn when using `test` operators in `(( 1 -eq 2 ))` |
| 68 | + |
| 69 | +### Changed |
| 70 | +- Unrecognized directives now causes a warning rather than parse failure. |
| 71 | + |
| 72 | +### Fixed |
| 73 | +- Indices in associative arrays are now parsed correctly |
| 74 | +- Missing shebang warning squashed when specifying with a directive |
| 75 | +- Ksh multidimensional arrays are now supported |
| 76 | +- Variables in substring ${a:x:y} expansions now count as referenced |
| 77 | +- SC1102 now also handles ambiguous `$((` |
| 78 | +- Using `$(seq ..)` will no longer suggest quoting |
| 79 | +- SC2148 (missing shebang) is now suppressed when using shell directives |
| 80 | +- `[ a '>' b ]` is now recognized as being correctly escaped |
| 81 | + |
| 82 | + |
| 83 | +## v0.4.4 - 2016-05-15 |
| 84 | +### Added |
| 85 | +- Haskell Stack support (thanks, Arguggi!) |
| 86 | +- SC2179/SC2178: Warn when assigning/appending strings to arrays |
| 87 | +- SC1102: Warn about ambiguous `$(((` |
| 88 | +- SC1101: Warn when \\ linebreaks have trailing spaces |
| 89 | + |
| 90 | +### Changed |
| 91 | +- Directives directly after the shebang now apply to the entire file |
| 92 | + |
| 93 | +### Fixed |
| 94 | +- `{$i..10}` is now flagged similar to `{1..$i}` |
| 95 | + |
| 96 | + |
| 97 | +## v0.4.3 - 2016-01-13 |
| 98 | +### Fixed |
| 99 | +- Build now works on GHC 7.6.3 as found on Debian Stable/Ubuntu LTS |
| 100 | + |
| 101 | + |
| 102 | +## v0.4.2 - 2016-01-09 |
| 103 | +### Added |
| 104 | +- First class support for the `dash` shell |
| 105 | +- The `--color` flag similar to ls/grep's (thanks, haguenau!) |
| 106 | +- SC2174: Warn about unexpected behavior of `mkdir -pm` (thanks, eatnumber1!) |
| 107 | +- SC2172: Warn about non-portable use of signal numbers in `trap` |
| 108 | +- SC2171: Warn about `]]` without leading `[[` |
| 109 | +- SC2168: Warn about `local` outside functions |
| 110 | + |
| 111 | +### Fixed |
| 112 | +- Warnings about unchecked `cd` will no longer trigger with `set -e` |
| 113 | +- `[ a -nt/-ot/-ef b ]` no longer warns about being constant |
| 114 | +- Quoted test operators like `[ foo "<" bar ]` now parse |
| 115 | +- Escaped quotes in backticks now parse correctly |
| 116 | + |
| 117 | + |
| 118 | +## v0.4.1 - 2015-09-05 |
| 119 | +### Fixed |
| 120 | +- Added missing files to Cabal, fixing the build |
| 121 | + |
| 122 | + |
| 123 | +## v0.4.0 - 2015-09-05 |
| 124 | +### Added |
| 125 | +- Support for following `source`d files |
| 126 | +- Support for setting default flags in `SHELLCHECK_OPTS` |
| 127 | +- An `--external-sources` flag for following arbitrary `source`d files |
| 128 | +- A `source` directive to override the filename to `source` |
| 129 | +- SC2166: Suggest using `[ p ] && [ q ]` over `[ p -a q ]` |
| 130 | +- SC2165: Warn when nested `for` loops use the same variable name |
| 131 | +- SC2164: Warn when using `cd` without checking that it succeeds |
| 132 | +- SC2163: Warn about `export $var` |
| 133 | +- SC2162: Warn when using `read` without `-r` |
| 134 | +- SC2157: Warn about `[ "$var " ]` and similar never-empty string matches |
| 135 | + |
| 136 | +### Fixed |
| 137 | +- `cat -vnE file` and similar will no longer flag as UUOC |
| 138 | +- Nested trinary operators in `(( ))` now parse correctly |
| 139 | +- Ksh `${ ..; }` command expansions now parse |
| 140 | + |
| 141 | + |
| 142 | +## v0.3.8 - 2015-06-20 |
| 143 | +### Changed |
| 144 | +- ShellCheck's license has changed from AGPLv3 to GPLv3. |
| 145 | + |
| 146 | +### Added |
| 147 | +- SC2156: Warn about injecting filenames in `find -exec sh -c "{}" \;` |
| 148 | + |
| 149 | +### Fixed |
| 150 | +- Variables and command substitutions in brace expansions are now parsed |
| 151 | +- ANSI colors are now disabled on Windows |
| 152 | +- Empty scripts now parse |
| 153 | + |
| 154 | + |
| 155 | +## v0.3.7 - 2015-04-16 |
| 156 | +### Fixed |
| 157 | +- Build now works on GHC 7.10 |
| 158 | +- Use `regex-tdfa` over `regex-compat` since the latter crashes on OS X. |
| 159 | + |
| 160 | +## v0.3.6 - 2015-03-28 |
| 161 | +### Added |
| 162 | +- SC2155: Warn about masked return values in `export foo=$(exit 1)` |
| 163 | +- SC2154: Warn when a lowercase variable is referenced but not assigned |
| 164 | +- SC2152/SC2151: Warn about bad `return` values like `1234` and `"foo"` |
| 165 | +- SC2150: Warn about `find -exec "shell command" \;` |
| 166 | + |
| 167 | +### Fixed |
| 168 | +- `coproc` is now supported |
| 169 | +- Trinary operator now recognized in `((..))` |
| 170 | + |
| 171 | +### Removed |
| 172 | +- Zsh support has been removed |
| 173 | + |
| 174 | + |
| 175 | +## v0.3.5 - 2014-11-09 |
| 176 | +### Added |
| 177 | +- SC2148: Warn when not including a shebang |
| 178 | +- SC2147: Warn about literal ~ in PATH |
| 179 | +- SC1086: Warn about `$` in for loop variables, e.g. `for $i in ..` |
| 180 | +- SC1084: Warn when the shebang uses `!#` instead of `#!` |
| 181 | + |
| 182 | +### Fixed |
| 183 | +- Empty and comment-only backtick expansions now parse |
| 184 | +- Variables used in PS1/PROMPT\_COMMAND/trap now count as referenced |
| 185 | +- ShellCheck now skips unreadable files and directories |
| 186 | +- `-f gcc` on empty files no longer crashes |
| 187 | +- Variables in $".." are now considered quoted |
| 188 | +- Warnings about expansions in single quotes now include backticks |
| 189 | + |
| 190 | + |
| 191 | +## v0.3.4 - 2014-07-08 |
| 192 | +### Added |
| 193 | +- SC2146: Warn about precedence when combining `find -o` with actions |
| 194 | +- SC2145: Warn when concatenating arrays and strings |
| 195 | + |
| 196 | +### Fixed |
| 197 | +- Case statements now support `;&` and `;;&` |
| 198 | +- Indices in array declarations now parse correctly |
| 199 | +- `let` expressions now parsed as arithmetic expressions |
| 200 | +- Escaping is now respected in here documents |
| 201 | + |
| 202 | +### Changed |
| 203 | +- Completely drop Makefile in favor of Cabal (thanks rodrigosetti!) |
| 204 | + |
| 205 | + |
| 206 | +## v0.3.3 - 2014-05-29 |
| 207 | +### Added |
| 208 | +- SC2144: Warn when using globs in `[/[[` |
| 209 | +- SC2143: Suggesting using `grep -q` over `[ "$(.. | grep)" ]` |
| 210 | +- SC2142: Warn when referencing positional parameters in aliases |
| 211 | +- SC2141: Warn about suspicious IFS assignments like `IFS="\n"` |
| 212 | +- SC2140: Warn about bad embedded quotes like `echo "var="value""` |
| 213 | +- SC2130: Warn when using `-eq` on strings |
| 214 | +- SC2139: Warn about define time expansions in alias definitions |
| 215 | +- SC2129: Suggest command grouping over `a >> log; b >> log; c >> log` |
| 216 | +- SC2128: Warn when expanding arrays without an index |
| 217 | +- SC2126: Suggest `grep -c` over `grep|wc` |
| 218 | +- SC2123: Warn about accidentally overriding `$PATH`, e.g. `PATH=/my/dir` |
| 219 | +- SC1083: Warn about literal `{/}` outside of quotes |
| 220 | +- SC1082: Warn about UTF-8 BOMs |
| 221 | + |
| 222 | +### Fixed |
| 223 | +- SC2051 no longer triggers for `{1,$n}`, only `{1..$n}` |
| 224 | +- Improved detection of single quoted `sed` variables, e.g. `sed '$s///'` |
| 225 | +- Stop warning about single quoted variables in `PS1` and similar |
| 226 | +- Support for Zsh short form loops, `=(..)` |
| 227 | + |
| 228 | +### Removed |
| 229 | +- SC1000 about unescaped lonely `$`, e.g. `grep "^foo$"` |
| 230 | + |
| 231 | + |
| 232 | +## v0.3.2 - 2014-03-22 |
| 233 | +### Added |
| 234 | +- SC2121: Warn about trying to `set` variables, e.g. `set var = value` |
| 235 | +- SC2120/SC2119: Warn when a function uses `$1..` if none are ever passed |
| 236 | +- SC2117: Warn when using `su` in interactive mode, e.g. `su foo; whoami` |
| 237 | +- SC2116: Detect useless use of echo, e.g. `for i in $(echo $var)` |
| 238 | +- SC2115/SC2114: Detect some catastrophic `rm -r "$empty/"` mistakes |
| 239 | +- SC1081: Warn when capitalizing keywords like `While` |
| 240 | +- SC1077: Warn when using acute accents instead of backticks |
| 241 | + |
| 242 | +### Fixed |
| 243 | +- Shells are now properly recognized in shebangs containing flags |
| 244 | +- Stop warning about math on decimals in ksh/zsh |
| 245 | +- Stop warning about decimal comparisons with `=`, e.g. `[ $version = 1.2 ]` |
| 246 | +- Parsing of `|&` |
| 247 | +- `${a[x]}` not counting as a reference of `x` |
| 248 | +- `(( x[0] ))` not counting as a reference of `x` |
| 249 | + |
| 250 | + |
| 251 | +## v0.3.1 - 2014-02-03 |
| 252 | +### Added |
| 253 | +- The `-s` flag to specify shell dialect |
| 254 | +- SC2105/SC2104: Warn about `break/continue` outside loops |
| 255 | +- SC1076: Detect invalid `[/[[` arithmetic like `[ 1 + 2 = 3 ]` |
| 256 | +- SC1075: Suggest using `elif` over `else if` |
| 257 | + |
| 258 | +### Fixed |
| 259 | +- Don't warn when comma separating elements in brace expansions |
| 260 | +- Improved detection of single quoted `sed` variables, e.g. `sed '$d'` |
| 261 | +- Parsing of arithmetic for loops using `{..}` instead of `do..done` |
| 262 | +- Don't treat the last pipeline stage as a subshell in ksh/zsh |
| 263 | + |
| 264 | + |
| 265 | +## v0.3.0 - 2014-01-19 |
| 266 | +### Added |
| 267 | +- A man page (thanks Dridi!) |
| 268 | +- GCC compatible error reporting (`shellcheck -f gcc`) |
| 269 | +- CheckStyle compatible XML error reporting (`shellcheck -f checkstyle`) |
| 270 | +- Error codes for each warning, e.g. SC1234 |
| 271 | +- Allow disabling warnings with `# shellcheck disable=SC1234` |
| 272 | +- Allow disabling warnings with `--exclude` |
| 273 | +- SC2103: Suggest using subshells over `cd foo; bar; cd ..` |
| 274 | +- SC2102: Warn about duplicates in char ranges, e.g. `[10-15]` |
| 275 | +- SC2101: Warn about named classes not inside a char range, e.g. `[:digit:]` |
| 276 | +- SC2100/SC2099: Warn about bad math expressions like `i=i+5` |
| 277 | +- SC2098/SC2097: Warn about `foo=bar echo $foo` |
| 278 | +- SC2095: Warn when using `ssh`/`ffmpeg` in `while read` loops |
| 279 | +- Better warnings for missing here doc tokens |
| 280 | + |
| 281 | +### Fixed |
| 282 | +- Don't warn when single quoting variables with `ssh/perl/eval` |
| 283 | +- `${!var}` is now counted as a variable reference |
| 284 | + |
| 285 | +### Removed |
| 286 | +- Suggestions about using parameter expansion over basename |
| 287 | +- The `jsoncheck` binary. Use `shellcheck -f json` instead. |
| 288 | + |
| 289 | + |
| 290 | +## v0.2.0 - 2013-10-27 |
| 291 | +### Added |
| 292 | +- Suggest `./*` instead of `*` when passing globs to commands |
| 293 | +- Suggest `pgrep` over `ps | grep` |
| 294 | +- Warn about unicode quotes |
| 295 | +- Warn about assigned but unused variables |
| 296 | +- Inform about client side expansion when using `ssh` |
| 297 | + |
| 298 | +### Fixed |
| 299 | +- CLI tool now uses exit codes and stderr canonically |
| 300 | +- Parsing of extglobs containing empty patterns |
| 301 | +- Parsing of bash style `eval foo=(bar)` |
| 302 | +- Parsing of expansions in here documents |
| 303 | +- Parsing of function names containing :+- |
| 304 | +- Don't warn about `find|xargs` when using `-print0` |
| 305 | + |
| 306 | + |
| 307 | +## v0.1.0 - 2013-07-23 |
| 308 | +### Added |
| 309 | +- First release |
0 commit comments