Add JSON1 as a separate format, wrap result in an object

This commit is contained in:
Vidar Holen
2019-06-02 10:28:37 -07:00
parent f4be53eb19
commit 1297ef46d7
3 changed files with 9 additions and 14 deletions

View File

@@ -27,6 +27,7 @@ import qualified ShellCheck.Formatter.CheckStyle
import ShellCheck.Formatter.Format
import qualified ShellCheck.Formatter.GCC
import qualified ShellCheck.Formatter.JSON
import qualified ShellCheck.Formatter.JSON1
import qualified ShellCheck.Formatter.TTY
import qualified ShellCheck.Formatter.Quiet
@@ -141,8 +142,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 False), -- JSON with 8-char tabs
("json1", ShellCheck.Formatter.JSON.format True), -- JSON with 1-char tabs
("json", ShellCheck.Formatter.JSON.format),
("json1", ShellCheck.Formatter.JSON1.format),
("tty", ShellCheck.Formatter.TTY.format options),
("quiet", ShellCheck.Formatter.Quiet.format options)
]