Vidar Holen
754ab22d94
Warn about unquoted blanks in echo ( fixes #377 )
2021-07-26 18:59:33 -07:00
Vidar Holen
44471b73cc
Have SC2155 trigger on 'typeset' as well ( fixes #2262 )
2021-07-25 17:34:14 -07:00
Vidar Holen
9eb63c97e6
Re-add warnings about 'declare var = value' ( fixes #2279 )
2021-07-24 13:25:56 -07:00
Matthias Diener
087865c680
Clarify 'which'
2021-03-20 20:43:18 -05:00
Vidar Holen
15ff87cf80
Merge pull request #2119 from josephcsible/refactors
...
Various refactorings
2021-02-02 18:14:27 -08:00
Vidar Holen
9584266a8b
Escape control characters when adding user data to messages
2020-12-31 12:28:48 -08:00
Joseph C. Sible
2cfd1f2714
Fuse maps
2020-12-28 18:13:34 -05:00
Joseph C. Sible
8480563672
Use syntactic sugar instead of building lists by hand
2020-12-28 18:13:34 -05:00
Joseph C. Sible
0607039d41
Simplify actualArgs
2020-12-28 17:21:47 -05:00
Vidar Holen
b625562d60
Add POSIX checks for more Bash-specific variables ( fixes #2093 )
2020-12-05 20:11:12 -08:00
Vidar Holen
3104cec770
SC2267: Warn about xargs -i ( fixes #2058 )
2020-10-18 22:10:14 -07:00
Vidar Holen
f100c2939e
Rewrite getopts style option parser
2020-10-18 21:34:58 -07:00
Vidar Holen
c4cc2debb7
Improve compatibility checks
2020-09-07 21:05:49 -07:00
Vidar Holen
cfd68ee0c2
Give each sh/dash compatibility warning its own SC3xxx error code
2020-09-01 16:48:14 -07:00
Vidar Holen
9e59bcca91
Upgrade SC2169 (unsupported in dash) from warning to error ( fixes #2013 )
2020-08-23 15:49:20 -07:00
Vidar Holen
14e6806092
Handle literal linefeeds in printf format strings ( fixes #2007 )
2020-07-25 17:36:22 -07:00
Vidar Holen
5d753212fb
Improve handling of command prefixes like exec/command ( fixes #2008 )
2020-07-25 13:45:05 -07:00
Vidar Holen
5b86777f9d
Warn about non-POSIX case modification expansions ( fixes #1977 )
2020-07-22 17:32:00 -07:00
Vidar Holen
75863a887e
Merge pull request #1918 from josephcsible/getsuspiciousregexwildcard
...
Clean up and optimize getSuspiciousRegexWildcard
2020-04-12 15:32:00 -07:00
Vidar Holen
30523555af
Merge pull request #1906 from josephcsible/shellsupport
...
Simplify ShellSupport
2020-04-12 15:22:52 -07:00
Vidar Holen
58d3e50f43
Merge pull request #1905 from josephcsible/skiprepeating
...
Make skipRepeating lazier and faster
2020-04-12 15:21:39 -07:00
Vidar Holen
73cc11fd0a
Merge pull request #1901 from josephcsible/bracedstring
...
Mostly get rid of bracedString
2020-04-12 15:14:50 -07:00
Joseph C. Sible
163c710ba7
Clean up and optimize getSuspiciousRegexWildcard
2020-04-12 16:15:45 -04:00
Joseph C. Sible
999b7e2596
Get rid of bracedString everywhere it's easy to
2020-04-11 19:24:11 -04:00
Joseph C. Sible
a9d564a8bc
Combine bracedString into getSingleUnmodifiedVariable
...
Everywhere we used getSingleUnmodifiedVariable, we just called bracedString on
the result. Move this into that function instead, and rename it accordingly.
2020-04-11 19:23:13 -04:00
Joseph C. Sible
8a6679fd8a
Remove unnecessary fromMaybe and when from bashism
2020-04-05 22:03:50 -04:00
Joseph C. Sible
facf0d1e27
Write getLiteralArgs with foldr and without fromMaybe or monads
2020-04-05 21:59:27 -04:00
Joseph C. Sible
cd38afce26
Make it slightly lazier still (and more clear)
2020-04-05 21:46:08 -04:00
Joseph C. Sible
5084ba8d7e
Make skipRepeating lazier and faster
2020-04-05 21:39:14 -04:00
Joseph C. Sible
ed331b816b
Simplify warnRedundant
2020-04-05 20:32:39 -04:00
Joseph C. Sible
cfa2a663af
Simplify checkSetAssignment
2020-04-05 20:30:37 -04:00
Joseph C. Sible
df4928f4e3
Use MultiWayIf instead of case-matching on ()
2020-04-05 20:30:37 -04:00
Joseph C. Sible
9747b1d5c3
Simplify checkArg
2020-04-05 20:10:56 -04:00
Joseph C. Sible
fa841cb270
Prefer pattern matching in undirected
2020-04-05 20:08:02 -04:00
Joseph C. Sible
e8501151dd
Use a guard instead of unless
2020-04-05 20:04:54 -04:00
Joseph C. Sible
9027a9239f
Use pattern matching instead of snd
2020-04-05 20:03:17 -04:00
Joseph C. Sible
773e98868d
Use foldr in checkFindNameGlob
2020-04-05 19:53:40 -04:00
Joseph C. Sible
eecd003e2d
Optimize patterns in checkFindNameGlob
...
1. Instead of pattern-matching the same list multiple times, do it only
once and then pass the pieces separately.
2. Don't reconstruct an object equivalent to one we just deconstructed.
2020-02-11 01:04:49 -05:00
Joseph C. Sible
440d0038aa
Remove a partial pattern match equivalent to fromJust from checkFindNameGlob
2020-02-11 01:03:10 -05:00
Vidar Holen
d0beac6d0b
Merge pull request #1826 from josephcsible/nofromjust
...
Use the Identity monad to avoid unnecessary uses of fromJust
2020-02-10 18:05:36 -08:00
Joseph C. Sible
d5c5128115
Use isJust instead of reimplementing it
2020-02-09 23:18:09 -05:00
Joseph C. Sible
6d06103cab
Remove unnecessary uses of head
2020-02-09 23:18:09 -05:00
Joseph C. Sible
7e6a556ef1
Get rid of potentially
...
This already exists as sequence_.
2020-02-09 23:17:52 -05:00
Joseph C. Sible
ffbbfcfe25
Use mapM_ and sequence_ instead of reimplementing them
2020-02-09 23:17:52 -05:00
Joseph C. Sible
cc424bac11
Use find instead of take 1 and filter
2020-02-09 23:17:52 -05:00
Joseph C. Sible
4d92a2e15c
Add getLiteralStringDef and simplify with it
2020-02-09 21:36:38 -05:00
Joseph C. Sible
f8648e5465
Switch getLiteralStringExt to Identity where it can never be Nothing
2020-02-09 21:26:42 -05:00
Joseph C. Sible
aaffe38198
Use the Identity monad to avoid unnecessary uses of fromJust
2020-02-08 23:20:54 -05:00
Joseph C. Sible
392b57b8e8
Use maybe instead of isJust and fromJust
2020-02-02 00:27:05 -05:00
Joseph C. Sible
c29b6afa56
Use null instead of comparing with empty lists
2020-02-01 23:04:04 -05:00