mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-19 21:03:51 -07:00
Add json1 format that ignores tabs
The new json1 format works just like json except that it treats tabs as single characters instead of 8-character tabstops. The main use case is to allow editors to pass -fjson1 so that they can consume the json output in a character-oriented way without breaking backwards compatibility. Also addresses #1048.
This commit is contained in:
parent
5fb1da6814
commit
50af8aba29
5 changed files with 33 additions and 7 deletions
|
@ -141,7 +141,8 @@ formats :: FormatterOptions -> Map.Map String (IO Formatter)
|
|||
formats options = Map.fromList [
|
||||
("checkstyle", ShellCheck.Formatter.CheckStyle.format),
|
||||
("gcc", ShellCheck.Formatter.GCC.format),
|
||||
("json", ShellCheck.Formatter.JSON.format),
|
||||
("json", ShellCheck.Formatter.JSON.format False), -- JSON with 8-char tabs
|
||||
("json1", ShellCheck.Formatter.JSON.format True), -- JSON with 1-char tabs
|
||||
("tty", ShellCheck.Formatter.TTY.format options),
|
||||
("quiet", ShellCheck.Formatter.Quiet.format options)
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue