Vidar Holen
d0dd81e1fa
Allow quoting values in directives ( fixes #2517 )
2022-07-28 08:56:44 -07:00
Vidar Holen
f440912279
Refactor to not generate Parameters twice
2022-07-28 08:26:56 -07:00
Vidar Holen
3ce310e939
Plug space leaks when processing multiple files
2022-07-27 14:42:57 -07:00
Vidar Holen
a30ac402eb
Don't use & for updates as result is unspecified
...
This fixes `Prelude.foldl1: empty list []` when script has `( exit )`
2022-07-27 11:30:26 -07:00
Vidar Holen
4a27c9a8d5
Fix overlap check
2022-07-26 15:33:25 -07:00
Vidar Holen
b5f5e6347d
Discard next rather than existing fixes when they overlap
2022-07-26 13:41:22 -07:00
Vidar Holen
c57e447c89
Correctly discard overlapping fixes in diff output ( fixes #2370 )
2022-07-26 10:16:12 -07:00
Vidar Holen
e9784fa9a7
Refine #2544 to not warn when $? postdominates [ ] ( fixes #2544 )
2022-07-25 12:00:59 -07:00
Vidar Holen
f1148b8b41
Include postdominators in CFGResult
2022-07-25 12:00:53 -07:00
Vidar Holen
982681fc05
Add unit test to ensure SC2321 does not trigger on associative arrays
2022-07-24 14:30:31 -07:00
Vidar Holen
52dac51cd4
SC2323: Warn about redundant parens in a[(x+1)] and $(( ((x)) )) (ref: #1666 )
2022-07-24 14:18:38 -07:00
Vidar Holen
30bb0e0093
SC2321: Warn about redundant $(()) in arr[$((i))]=x (ref: #1666 )
2022-07-24 14:18:38 -07:00
Vidar Holen
d1d574c091
Merge branch 'ygeyzel-grammer_fix_sc2183'
2022-07-23 15:39:26 -07:00
Vidar Holen
ea4e0091c7
Additionally pluralize 'arguments' in SC2183
2022-07-23 15:38:42 -07:00
Vidar Holen
81d9f7e640
Merge branch 'grammer_fix_sc2183' of https://github.com/ygeyzel/shellcheck into ygeyzel-grammer_fix_sc2183
2022-07-23 15:34:22 -07:00
Vidar Holen
69469c3603
Merge pull request #2543 from ygeyzel/SC2028-escape-chars
...
Add escape characters to SC2028: \a, \b, \e, \f, \v, \\, \', \OOO, \xHH
2022-07-23 15:30:00 -07:00
Vidar Holen
5cf6e01ce9
Warn when $? refers to echo or condition (ref #2541 )
2022-07-23 09:39:26 -07:00
ygeyzel
f7857028f7
Add escape characters to SC2028: \a, \b, \e, \f, \v, \\, \', \OOO, \xHH
2022-07-23 19:28:37 +03:00
Vidar Holen
b261ec24f9
Include exit codes in DFA (ref #2541 )
2022-07-23 08:50:19 -07:00
Vidar Holen
819470fa1d
Omit SC3021 about `>& file` unless definitely non-numeric ( fixes #2520 )
2022-07-22 17:06:24 -07:00
Vidar Holen
2f28847b08
Normalize spaces around = in unit tests
2022-07-22 16:35:14 -07:00
Vidar Holen
e47480e93a
Also emit SC2004 for array indices ( fixes #1666 )
2022-07-22 16:29:52 -07:00
Vidar Holen
9caeec104b
SC2318: Warn about backreferencing in `declare x=1 y=$x` ( fixes #1653 )
2022-07-22 12:40:59 -07:00
Vidar Holen
95b3cbf071
Qualify Data.Map as M instead of tedious Map
2022-07-22 11:11:09 -07:00
Vidar Holen
e7f05d662a
In addition to start/end, track sets of nodes belonging to tokens
2022-07-22 10:29:19 -07:00
Vidar Holen
3ee4419ef4
Suppress SC2086 for variables declared -i (ref #2541 )
2022-07-22 08:53:27 -07:00
Vidar Holen
8dc0fdb4cc
Precompile new fgl dependency on armv6hf
2022-07-20 12:52:57 -07:00
Vidar Holen
da4885a71d
Use DFA for SC2086
2022-07-20 08:08:44 -07:00
Vidar Holen
642ad86125
Add SC2317 warning about unreachable commands
2022-07-20 08:08:41 -07:00
Vidar Holen
f77a545282
Control Flow Graph / Data Flow Analysis support
2022-07-20 08:08:24 -07:00
Vidar Holen
7946bf5657
Upgrade cURL for Windows build image
2022-07-20 08:08:24 -07:00
Vidar Holen
cc04b40119
Freeze macOS dependency by sha256
2022-07-20 08:08:24 -07:00
Vidar Holen
c3bce51de3
Allow text to build on Fedora by installing dependencies
2022-07-20 08:08:24 -07:00
Vidar Holen
a4042f7523
Parse &&/|| as left-associative
2022-07-20 08:08:24 -07:00
Vidar Holen
363c0633e0
When reparsing array indices, do it recursively
2022-07-20 08:08:24 -07:00
ygeyzel
7ceb1f1519
SC2183 grammer fix: 'variable' instead of 'variables' if only one variable
2022-07-17 21:46:42 +03:00
Vidar Holen
f1bdda54cb
Merge pull request #2500 from Fdawgs/patch-1
...
ci: update github actions
2022-05-20 20:36:36 -07:00
Frazer Smith
9aa4c22aa6
ci: update github actions
2022-05-16 06:56:46 +00:00
Vidar Holen
399c04cc17
Mention SC2316 in changelog
2022-05-06 10:11:52 -07:00
Vidar Holen
fd595d1058
Only trigger SC2316 on unquoted words.
2022-05-06 10:06:12 -07:00
Vidar Holen
7c44e1060f
Merge branch 'patrickxia-master'
2022-05-06 09:50:08 -07:00
Rune Juhl Jacobsen
2821552688
Fix bug in 2126 when using after/before flags with grep
...
Using `--after-context`/`-A` or `--before-context`/`-B` would give a warning
recommending the user to use `grep -c`, even though that would give a different
result than using `grep | wc -l`:
```fundamental
$ echo -e "1\n2\n3" | grep -cA 3 1
1
$ echo -e "1\n2\n3" | grep -A 3 1 | wc -l
3
```
2022-05-06 09:17:23 -07:00
Vidar Holen
2034e3886e
Merge pull request #2414 from runejuhl/fix-grep-after-before
...
Fix bug in 2126 when using after/before flags with grep
2022-05-06 09:15:04 -07:00
Patrick Xia
fa15c0a454
add SC2316: error on multiple declarations like 'readonly local'
2022-05-05 16:19:07 -07:00
Vidar Holen
88cdb4e2c9
Warn about spaces around = in alias ( fixes #2442 )
2022-02-03 19:23:46 -08:00
Vidar Holen
2292e852e5
Switch linux-x86_64 build from Ubuntu to Alpine for musl
2022-01-23 14:23:56 -08:00
Vidar Holen
ade2bf7b87
Allow parsing [[ x = ["$y"] ]] ( fixes #2165 )
2022-01-09 16:50:50 -08:00
Vidar Holen
e6e558946c
Improve decoding of single quoted literals ( fixes #2418 )
2021-12-21 14:30:39 -08:00
Rune Juhl Jacobsen
3a118246ef
Fix bug in 2126 when using after/before flags with grep
...
Using `--after-context`/`-A` or `--before-context`/`-B` would give a warning
recommending the user to use `grep -c`, even though that would give a different
result than using `grep | wc -l`:
```fundamental
$ echo -e "1\n2\n3" | grep -cA 3 1
1
$ echo -e "1\n2\n3" | grep -A 3 1 | wc -l
3
```
2021-12-14 16:03:29 +01:00
Vidar Holen
dd626686c4
Merge pull request #2375 from scop/spelling
...
Comment spelling fixes
2021-12-05 14:27:08 -08:00