Joseph C. Sible
ba86c6363c
Use maybe instead of fromMaybe and fmap
2024-01-02 14:46:07 -05:00
Joseph C. Sible
67abfe159e
Remove most of the partial head and tail functions from src/ShellCheck/CFG.hs
2024-01-01 19:04:26 -05:00
Joseph C. Sible
025cc5266e
Simplify isUnquotedFlag
2024-01-01 16:00:19 -05:00
Joseph C. Sible
5a6f4840ad
Replace a few more occurrences of !!! with pattern matching
2024-01-01 14:18:52 -05:00
Joseph C. Sible
9e0fdbe431
Simplify isTransparentCommand
2023-12-31 18:13:32 -05:00
Joseph C. Sible
b7f88ec4b7
Stop building tuples that we never look at both sides of
2023-12-31 18:09:02 -05:00
Joseph C. Sible
7b0589988f
Implement isCondition in terms of foldr
2023-12-31 17:21:50 -05:00
Joseph C. Sible
71889c139a
Use a case expression instead of any and take 1
2023-12-31 16:44:21 -05:00
Joseph C. Sible
a6984cddb0
Switch then and else to remove a not
2023-12-31 16:40:18 -05:00
Joseph C. Sible
3f40b688ee
Simplify getStringFromParsec
2023-12-31 16:33:34 -05:00
Joseph C. Sible
6c81505870
Use a pattern guard instead of fromJust in checkLoopKeywordScope
2023-12-31 16:26:03 -05:00
Joseph C. Sible
10afe83ce3
Use getLiteralStringDef instead of rebuilding it with fromJust
2023-12-31 16:23:45 -05:00
Joseph C. Sible
a786f996a1
Replace !!! with pattern-matching where it's easy
2023-12-31 15:55:06 -05:00
Joseph C. Sible
6e5b5401c6
Manually fuse elem and map in checkArrayValueUsedAsIndex
2023-12-31 02:31:07 -05:00
Joseph C. Sible
71c0fcb737
Manually fuse elem and map in isParentOf
2023-12-31 02:27:52 -05:00
Joseph C. Sible
add49cda17
Make getPath return a NonEmpty
2023-12-31 02:12:58 -05:00
Joseph C. Sible
e1ad063834
Implement getPath in terms of unfoldr
2023-12-31 01:59:53 -05:00
Joseph C. Sible
980e7d3ca8
Use <$> instead of >>= and return
2023-12-30 14:49:26 -05:00
Joseph C. Sible
dedf932fe8
Use traverse instead of sequence and map
2023-12-30 13:59:15 -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
dab77b2c8d
Implement parseEnum in terms of lookup
2023-12-21 13:48:47 -05:00
Joseph C. Sible
f983d9ae93
Simplify functionMap and remove unnecessary partiality
2023-12-21 13:35:22 -05:00
Joseph C. Sible
bfe4342697
Remove unnecessary partiality from check
2023-12-19 02:30:48 -05:00
Joseph C. Sible
a47a42cb45
Remove unnecessary partiality from isAssignmentParamToCommand
2023-12-19 02:17:59 -05:00
Joseph C. Sible
eed0174e90
Make "Unresolved scope in dependency" impossible
2023-12-19 02:06:45 -05:00
Joseph C. Sible
0c46b8b2d5
Use NonEmpty to remove partiality from handleCommand
2023-12-19 01:49:04 -05:00
Joseph C. Sible
208e38358e
Use a list comprehension to remove partiality from notesForContext
2023-12-19 01:00:20 -05:00
Joseph C. Sible
c1452e0d17
Remove unnecessary partiality from kludgeAwayQuotes
2023-12-19 00:53:08 -05:00
Joseph C. Sible
c97abdb939
Make HereDocPending only hold the relevant pieces of a T_HereDoc instead of an arbitrary Token
2023-12-19 00:41:12 -05:00
Joseph C. Sible
f242922a2e
Use onlyLiteralString in more places
2023-12-19 00:00:32 -05:00
Joseph C. Sible
a37803d2b8
Remove partial head function from src/ShellCheck/Formatter/CheckStyle.hs
2023-12-18 23:57:47 -05:00
Joseph C. Sible
5a961371a7
Remove partial head function from src/ShellCheck/Formatter/GCC.hs
2023-12-11 15:55:29 -05:00
Joseph C. Sible
e5208ccb50
Remove partial head function from src/ShellCheck/Formatter/JSON1.hs
2023-12-11 15:43:35 -05:00
Joseph C. Sible
4c1d9171b2
Remove partial head function from src/ShellCheck/Formatter/TTY.hs
2023-12-11 15:08:39 -05:00
Vidar Holen
a9e7bf1950
Reparse indices after attaching here docs ( fixes #2846 )
2023-12-10 19:13:34 -08:00
Vidar Holen
f2729f73cb
Abuse STRIP to avoid crashes on unsupported AST nodes
2023-12-10 17:58:47 -08:00
Vidar Holen
175d3cc9b7
Merge pull request #2876 from andreasabel/master
...
Testsuite: report which module failed the tests
2023-12-10 17:34:51 -08:00
Vidar Holen
5c50b0b189
Merge branch 'grische-feature/busyboxsh-support'
2023-12-10 17:15:57 -08:00
Vidar Holen
74282b0a93
Recognize 'busybox' in --shell and directives. Add to doc texts.
2023-12-10 17:05:29 -08:00
Andreas Abel
b6d4952e2e
Testsuite: report which module failed the tests
...
This also fixes the problem that the testsuite threw `exitFailure`
even when it succeeded (which I found inexplicable).
Once this is published, the testsuite could be enabled in Stackage again.
2023-12-06 18:41:53 +01: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
Grische
be8e4b2b8a
add basic busybox sh support
2023-11-27 13:00:10 +01:00
Vidar Holen
a71a13c2fc
Merge pull request #2837 from ulidtko/fix/missed-test(1)-bashisms
...
Fix: extend []-related bashism checks on `test` calls too
2023-11-08 13:06:26 -08:00
Joseph C. Sible
1aeab287e6
Add nil case that went missing in 4fd0615
2023-11-03 01:33:49 -04:00