Vidar Holen
d80fdfa9e8
Add extended-analysis directive to toggle DFA
2024-02-03 16:11:39 -08:00
Vidar Holen
a9e7bf1950
Reparse indices after attaching here docs ( fixes #2846 )
2023-12-10 19:13:34 -08:00
Vidar Holen
9490b94886
Save and restore pending here docs when sourcing files ( fixes #2803 )
2023-07-30 16:52:40 -07:00
Vidar Holen
8c5fdc3522
Update copyright years
2022-12-12 21:49:19 -08:00
Vidar Holen
c76b8d9a32
Let annotations take effect earlier ( fixes #2534 )
2022-07-28 11:05:16 -07:00
Vidar Holen
d0dd81e1fa
Allow quoting values in directives ( fixes #2517 )
2022-07-28 08:56:44 -07:00
Vidar Holen
f440912279
Refactor to not generate Parameters twice
2022-07-28 08:26:56 -07:00
Vidar Holen
3b6972fbf1
Update copyright years
2021-11-06 19:07:34 -07:00
Vidar Holen
09aa15c9b7
Allow disable=all
to disable all warnings ( fixes #2323 )
2021-09-18 12:50:01 -07:00
Vidar Holen
4e703e5c61
Allow specifying external-sources=true in shellcheckrc ( fixes #1818 )
2021-09-15 18:02:37 -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
210cdcd01a
Treat $x/ or $(x)/ as ./ when finding sourced files ( fixes #1998 )
2020-06-28 17:24:07 -07:00
Vidar Holen
c2a15ce8e9
Allow disabling SC1072/SC1073 with annotations ( fixes #1931 )
2020-05-03 21:57:16 -07:00
Vidar Holen
7963eeab9d
Include shebang in AST traversal ( fixes #1858 )
2020-03-16 21:36:41 -07:00
Joseph C. Sible
42abcb7ae2
Simplify shellFromFilename
2020-02-09 23:18:09 -05:00
Joseph C. Sible
c29b6afa56
Use null instead of comparing with empty lists
2020-02-01 23:04:04 -05:00
Joseph C. Sible
5487b3f229
Use sortOn instead of sortBy and comparing
2020-02-01 22:50:18 -05:00
Joseph C. Sible
28978a8b65
Use maybe instead of fromMaybe and fmap
2020-02-01 22:50:17 -05:00
Virgil
ea05271fa3
📝 Update Copyright to year 2019 and Markdown linting
...
- [x] 📝 Update Copyright to year 2019
- [x] 📝 MD009/no-trailing-spaces: Trailing spaces [Expected: 0 or 2; Actual: 1]
- [x] 📝 MD034/no-bare-urls: Bare URL used
- [ ] 📝 ~MD004/ul-style: Unordered list style [Expected: dash; Actual: asterisk]~
- [ ] ~add missing TOC entries~
2019-05-14 20:12:34 +10:00
Vidar Holen
5fb1da6814
Replace verbose checks with optional checks
2019-05-12 19:14:04 -07:00
Vidar Holen
d9e419d60f
Add support for source-path directives ( fixes #1577 )
2019-05-09 19:54:41 -07:00
Vidar Holen
c6c12f52bd
Expand root paths into source paths
2019-04-24 18:51:24 -07:00
Vidar Holen
c53c8a5ead
Allow using 'source -- file' ( fixes #1518 )
2019-03-17 19:37:35 -07:00
Vidar Holen
581bcc3907
Add support for .shellcheckrc
files
2019-03-03 18:57:13 -08:00
Vidar Holen
2737496b3a
Fix grammatical error in comments
2019-01-22 19:47:40 -08:00
Gandalf-
59c47f2266
Issue 837 flag to include only certain warnings
...
Issue https://github.com/koalaman/shellcheck/issues/837
Add an --include option, which creates a whitelist of warnings to report
on, the opposite of --exclude.
2019-01-20 16:42:27 -08:00
Vidar Holen
e1fe9be7af
Fix minor details in new Bats support
2019-01-20 14:02:42 -08:00
Vidar Holen
a504ca6b57
Add some unit tests for extension detection
2019-01-20 13:24:31 -08:00
Tito Sacchi
9f45dc4c8b
Not determine the shell from .sh
extension
...
See discussion on issue #1369 for details.
2019-01-18 09:21:07 +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
138080bdc7
Fix infinite loop on annotations for SC2188 ( fixes #1413 )
2018-12-16 14:42:19 -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
Vidar Holen
932e2b3538
Merge branch 'opqaque-interface' of https://github.com/ngzhian/shellcheck into ngzhian-opqaque-interface
2018-08-18 20:32:27 -07:00
Martin Schwenke
3fe11927bb
SQUASH: --severity specifies *minimum* severity to be handled
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
2018-08-18 20:05:56 -07:00
Martin Schwenke
b16da4b242
Add command-line option -S/--severity
...
Specifies the maximum severity of errors to handle. For example,
specifying "-S warning" means that errors of severity "info" and
"style" are ignored.
Signed-off-by: Martin Schwenke <martin@meltin.net>
2018-08-18 20:05:56 -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
b63483d44c
Remove unused import
2018-06-12 22:50:02 -07:00
Ng Zhi An
4111ce8fde
Make end pos non-optional
2018-06-12 22:39:06 -07:00
Ng Zhi An
48ac654a93
Merge end pos map into start pos map
2018-06-07 21:55:41 -07:00
Russell Harmon
4470fe715c
Support emitting a correct end column on SC2086
...
This does the necessary work to emit end columns on AST analyses. SC2086
is made to emit a correct end column as an illustrative example.
For example:
```
$ shellcheck -s bash -f json /dev/stdin <<< 'echo $1'
[{"file":"/dev/stdin","line":1,"endLine":1,"column":6,"endColumn":8,"level":"info","code":2086,"message":"Double quote to prevent globbing and word splitting."}]
```
This change deprecates the parser's getNextId and getNextIdAt, replacing
it with a new withNextId function. This function has the type signature:
withNextId :: Monad m => ParsecT s UserState (SCBase m) (Id -> b) -> ParsecT s UserState (SCBase m) b
Specifically, it should be used to wrap read* functions and will pass in
a newly generated Id which should be used to represent that node.
Sub-parsers will need their own call to withNextId in order to get a
unique Id.
In doing this, withNextId can now track both the entry and exit position
of every read* parser which uses it, enabling the tracking of end
columns throughout the application.
2018-06-07 21:55:41 -07:00
Vidar Holen
467dfe07b6
Add a unit test and separate ids for 884eff0c
2018-05-23 19:51:36 -07:00
Oleg Grenrus
cd7c077ecc
Move library into src/
2018-03-08 19:57:40 +02:00