Commit Graph

21 Commits

Author SHA1 Message Date
Vidar Holen c97cb8cf54 Merge branch 'bats-support' of https://github.com/damienrg/shellcheck 2019-01-20 13:35:12 -08:00
Vidar Holen f187382a0c Add bats support
This is motivated by the fact that the popularity of bats is increasing
since the creation of bats-core/bats-core.

The code is a cherry-pick of koalaman/shellcheck/bats branch.

Fix koalaman/shellcheck#417.
2019-01-20 14:59:37 +01:00
Tito Sacchi 1e6a30905a Make ShellCheck not emit warnings about the shebang if the shell
type is determined from the extension
2019-01-14 14:32:25 +01:00
Tito Sacchi a4b9cec9f0 Fix #1369 (Use file extension to detect shell)
The precedence order that is used to determine the shell
is the following:
1. ShellCheck directive
2. Shebang
3. File extension
A new field `asFallbackShell` has been
added to the record type `AnalysisSpec`.
2019-01-14 14:32:25 +01:00
Vidar Holen df7f00eaed Remove duplicate `pathTo` and unused `replaceMultiLines` 2019-01-09 17:51:43 -08:00
Vidar Holen 73822c3588 Allow SC2243 and SC2244 to trigger with quotes, add fix 2018-12-28 19:02:06 -08:00
Vidar Holen 5b3f17c29d Allow tests to access token positions for fixes 2018-12-16 13:17:59 -08:00
Vidar Holen bcd13614eb Improve Fix memory usage 2018-12-09 15:01:08 -08:00
Ng Zhi An 4a87d2a3de Expose token positions in params, use that to construct fixes 2018-12-09 15:01:08 -08:00
Ng Zhi An 41613babd9 Prototype fix 2018-12-09 15:01:08 -08:00
Peter Simons 5f1c969546 getParentTree: avoid pattern matching in do notation
Pattern matching in "do" requires a MonadFail context, which we don't have in
pure code. Instead, we'll use "case-of" to bind the part of the state that
we're interested in.
2018-09-27 17:30:41 +02:00
Ng Zhi An 07f04e13ce Understand array variable declaration in read (fixes #679 fixes #1272)
It used to only treat all trailing variables in read as varaible
declarings, but an array variable can be declared in other positions:

    read -a foo -r

foo is a declared variable, and multiple such variables can be declared.
2018-09-08 09:19:02 -07:00
Ng Zhi An c8e0797350 Make data in Interface more opaque 2018-08-17 22:10:18 -07:00
Vidar Holen 5005dc0fa1 Allow directive/-s to override shebang blacklist (fixes #974) 2018-07-22 12:43:51 -07:00
Ng Zhi An 4dceecb1ed Handle offset references of the form [foo]:bar (fixes #1124) 2018-05-13 22:48:02 -07:00
Vidar Holen bca2ad4e18 Don't think declare -x -F var is used (fixes #1209). 2018-05-12 17:34:23 -07:00
Vidar Holen ef6a5b97b9 Refactor sudo checks into CommandChecks 2018-04-30 22:59:23 -07:00
Vidar Holen a1d8947297 Fix broken test stripping 2018-04-22 14:57:43 -07:00
Vanessa McHale 08aab3c161 hlints 2018-04-02 11:48:21 -05:00
Vanessa McHale cf39adff75 bump to latest ghc 2018-04-02 11:44:18 -05:00
Oleg Grenrus cd7c077ecc Move library into src/ 2018-03-08 19:57:40 +02:00