Commit Graph

1592 Commits

Author SHA1 Message Date
Vidar Holen 5cf2c00ff7 Warn about defining and using an alias in a single command (fixes #1807) 2020-05-25 23:24:33 -07:00
Vidar Holen a08ad3bee9 Count $# as an argument reference in SC2120 2020-05-25 23:24:33 -07:00
Vidar Holen 417e13f129
Merge pull request #1950 from geeseven/aur-shellcheck-bin
update dependency free AUR package
2020-05-25 18:06:35 -07:00
geeseven 536cb584f4
update dependency free AUR package
The `shellcheck-static` AUR package has been removed and `shellcheck-bin` is an option for a dependency free AUR package.
2020-05-12 14:58:15 -05:00
Vidar Holen c2a15ce8e9 Allow disabling SC1072/SC1073 with annotations (fixes #1931) 2020-05-03 21:57:16 -07:00
Vidar Holen d6adbfde78 Improve SC2259/60/61 messages 2020-05-03 21:46:16 -07:00
Vidar Holen 2030b83607 Warn about duplicate uses of stdin/out/err 2020-05-03 11:54:25 -07:00
Vidar Holen 8aa40c43ed
Merge pull request #1926 from scop/spelling
Spelling fixes
2020-05-02 18:39:44 -07:00
Vidar Holen 5a42f4b938
Merge pull request #1927 from scop/sc-prefix
Use SC prefix for disable= in man page
2020-04-25 16:37:55 -07:00
Vidar Holen a7a406c43c
Merge pull request #1925 from josephcsible/nofromright
Revert "Use fromRight instead of reimplementing it"
2020-04-25 16:37:22 -07:00
Ville Skyttä 1d126960f3 Use SC prefix for disable= in man page 2020-04-25 08:33:10 +03:00
Ville Skyttä 60e80e4ce1 Spelling fixes 2020-04-25 08:29:38 +03:00
Joseph C. Sible e0daa936d2 Revert "Use fromRight instead of reimplementing it"
We still support GHC 8.0, which didn't have fromRight.

This reverts commit 64c31d9142.
2020-04-24 22:14:08 -04: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 413f0048b8
Merge pull request #1917 from josephcsible/thenskip
Simplify thenSkip, and use in another location
2020-04-12 15:26:36 -07:00
Vidar Holen e7b5fb9742
Merge pull request #1907 from josephcsible/formatters
Clean up formatters
2020-04-12 15:23:17 -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
Vidar Holen ab1610b004
Merge pull request #1903 from josephcsible/fixer
Only perform the comparisons once
2020-04-11 17:23:51 -07:00
Vidar Holen 148468be70
Merge pull request #1904 from josephcsible/commands
Simplify Commands
2020-04-11 17:23:39 -07:00
Vidar Holen 5eac721fcf
Merge pull request #1902 from josephcsible/astlib
Clean up ASTLib
2020-04-11 17:23:08 -07:00
Joseph C. Sible b58bb4ba9d Move bracedString to be local to its last use site 2020-04-11 19:24:11 -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 8a7497c4f0 Simplify checkVariableBraces 2020-04-11 19:23:13 -04:00
Vidar Holen 1eac0d7340
Merge pull request #1900 from josephcsible/analyzerlib
Clean up AnalyzerLib
2020-04-11 16:21:20 -07:00
Vidar Holen f8c1ffb0dc
Merge pull request #1898 from josephcsible/nameexpansion
Simplify nameExpansion
2020-04-11 16:18:54 -07:00
Joseph C. Sible 3e17a20965 Simplify thenSkip, and use in another location 2020-04-11 17:29:28 -04:00
Joseph C. Sible 1c6202dba4 Avoid some awkward parentheses with forM_ 2020-04-05 22:25:19 -04:00
Joseph C. Sible 64c31d9142 Use fromRight instead of reimplementing it 2020-04-05 22:23:22 -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 d45ab327b0 Only perform the comparisons once 2020-04-05 19:45:28 -04:00
Joseph C. Sible 0f9b0f18a4 Remove unnecessary cases from wordToPseudoGlob 2020-04-05 19:30:21 -04:00
Joseph C. Sible 322842b57e Remove unnecessary monadicity from wordToPseudoGlob 2020-04-05 19:29:40 -04:00
Joseph C. Sible b6cff5ea0e Simplify getAssociativeArrays 2020-04-05 19:06:30 -04:00
Joseph C. Sible 8f105074fe Simplify getCommandNameAndToken 2020-04-05 19:01:56 -04:00
Joseph C. Sible d22e0aa4a7 Simplify process
Note to self: This is a lot like foldr or traverse, and would be trivial to
implement as such if it didn't need to peek ahead when takesArg is true. I
wonder if there's a clean way to implement it in terms of one of them anyway.
2020-04-05 16:45:45 -04:00