Commit Graph

166 Commits

Author SHA1 Message Date
Joseph C. Sible 26b949b9b0 Use mapM_ instead of isJust and fromJust 2024-12-13 23:45:32 -05:00
Joseph C. Sible 195b70db8c Use unless instead of when and not 2024-12-13 23:06:49 -05:00
Vidar Holen 4cd76283da
Merge pull request #3011 from sertonix/busybox-3003
Fix SC3003, SC3036 and SC3045 for busybox shell
2024-08-04 16:52:15 -07:00
Emil Berg 38c5ba7c79 Fix typos and trailing whitespace 2024-08-03 08:49:40 +02:00
Sertonix 6d2f3d8628 Allow 'echo -e' in busybox shell 2024-07-09 16:58:50 +02:00
Sertonix 4c85274921 Fix SC3045 for busybox shell 2024-07-09 16:57:44 +02:00
Sertonix 6593096ba0 Allow SC3003 on busybox shell 2024-07-09 16:56:59 +02:00
Vidar Holen d80fdfa9e8 Add extended-analysis directive to toggle DFA 2024-02-03 16:11:39 -08:00
Joseph C. Sible a786f996a1 Replace !!! with pattern-matching where it's easy 2023-12-31 15:55:06 -05:00
Joseph C. Sible add49cda17 Make getPath return a NonEmpty 2023-12-31 02:12:58 -05:00
Joseph C. Sible 3bd7df955b Use a pattern match instead of null and head in checkCommand 2023-12-29 14:18:42 -05:00
Joseph C. Sible bfe4342697 Remove unnecessary partiality from check 2023-12-19 02:30:48 -05:00
Joseph C. Sible f242922a2e Use onlyLiteralString in more places 2023-12-19 00:00:32 -05:00
Vidar Holen 74282b0a93 Recognize 'busybox' in --shell and directives. Add to doc texts. 2023-12-10 17:05:29 -08:00
Grische fdcce458c1 silence some shell expansions for busybox sh 2023-11-27 13:03:29 +01:00
Grische ca255fe326 silence SC3046 and SC3051 for busybox sh 2023-11-27 13:03:17 +01:00
Grische a3b8be82fe silence SC3048 for busybox sh 2023-11-27 13:03:07 +01:00
Grische ac63dc33c9 silence SC3020 for busybox sh 2023-11-27 13:02:56 +01:00
Grische 903421fb5d silence SC3014 for busybox sh 2023-11-27 13:02:45 +01:00
Grische 00ffd2db33 silence SC3010 for busybox sh 2023-11-27 13:02:28 +01:00
Grische 1e1045e73e make busybox sh Dash-like 2023-11-27 13:01:22 +01:00
Max Ulidtko c89ec2fd49
Fix: do []-related bashism checks on test(1) calls too 2023-10-01 19:57:19 +02:00
Vidar Holen dd747b2a98 SC2325/SC2326: Warn about ! ! foo and foo | ! bar (fixes #2810) 2023-07-30 19:18:27 -07:00
Vidar Holen a54965dd2c Merge branch 'ArenM-posix-read' 2023-04-30 14:49:36 -07:00
Vidar Holen 46b678fca8 Minor fixes to POSIX read without variable check 2023-04-30 14:49:10 -07:00
Vidar Holen 8c5fdc3522 Update copyright years 2022-12-12 21:49:19 -08:00
ArenM 3342902d9a Warn about 'read' without a variable in POSIX sh
Dash throws an error if the read command isn't supplied a variable name.
2022-11-17 18:46:15 -05: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
ygeyzel f7857028f7 Add escape characters to SC2028: \a, \b, \e, \f, \v, \\, \', \OOO, \xHH 2022-07-23 19:28:37 +03: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 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 f77a545282 Control Flow Graph / Data Flow Analysis support 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 fd595d1058 Only trigger SC2316 on unquoted words. 2022-05-06 10:06:12 -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
Ville Skyttä c5de58ae84 Comment spelling fixes 2021-11-13 12:50:53 +02:00
Vidar Holen 3b6972fbf1 Update copyright years 2021-11-06 19:07:34 -07:00
Vidar Holen 0dd5c67bdf Warn about [^..] in Dash (fixes #2361) 2021-10-21 21:00:39 -07:00
Vidar Holen c3aaa27540 Skip SC2214 if variable is modified in loop (fixes #2351) 2021-10-09 12:13:41 -07:00
Vidar Holen 3aedda766d For `while getopts; do case ..` checks, make sure variable matches 2021-10-09 11:40:52 -07:00
Vidar Holen 205ba429b3 Warn about `read foo[i]` expanding as glob (fixes #2345) 2021-10-07 18:50:44 -07:00
Christian Nassif-Haynes 093df8cb24 Add extra checks for masked return codes 2021-10-02 01:36:40 +10:00
Vidar Holen 081f7eba24 Fix parsing of [$var] (fixes #2309) 2021-08-26 23:05:14 -07:00
Vidar Holen 5b6fd60279 Improve warnings for expr (fixes #2033) 2021-08-22 21:12:58 -07:00
Vidar Holen da7b28213e Recognize wait -p as assigning a variable (fixes #2179) 2021-08-17 21:53:27 -07:00
Vidar Holen e5745568e8 Extend warnings about spaces around = to 'let' 2021-08-08 15:48:50 -07:00