mirror of
https://github.com/github/semantic.git
synced 2024-11-24 00:42:33 +03:00
Plumb in cmd line option for new toc output format
This commit is contained in:
parent
f8ecbf9286
commit
02f87738c0
@ -48,6 +48,7 @@ library
|
|||||||
, Renderer.Split
|
, Renderer.Split
|
||||||
, Renderer.Summary
|
, Renderer.Summary
|
||||||
, Renderer.SExpression
|
, Renderer.SExpression
|
||||||
|
, Renderer.TOC
|
||||||
, SemanticDiff
|
, SemanticDiff
|
||||||
, SES
|
, SES
|
||||||
, Source
|
, Source
|
||||||
|
@ -20,7 +20,7 @@ data DiffArguments = DiffArguments { format :: Format, output :: Maybe FilePath
|
|||||||
data Format = Split | Patch | JSON | Summary | SExpression | TOC
|
data Format = Split | Patch | JSON | Summary | SExpression | TOC
|
||||||
deriving (Show)
|
deriving (Show)
|
||||||
|
|
||||||
data Output = SplitOutput Text | PatchOutput Text | JSONOutput (Map Text Value) | SummaryOutput (Map Text (Map Text [Value])) | SExpressionOutput Text | TOCOutput [Map Text Value]
|
data Output = SplitOutput Text | PatchOutput Text | JSONOutput (Map Text Value) | SummaryOutput (Map Text (Map Text [Value])) | SExpressionOutput Text | TOCOutput (Map Text (Map Text [Value]))
|
||||||
deriving (Show)
|
deriving (Show)
|
||||||
|
|
||||||
-- Returns a key representing the filename. If the filenames are different,
|
-- Returns a key representing the filename. If the filenames are different,
|
||||||
|
@ -51,7 +51,8 @@ argumentsParser = info (version <*> helper <*> argumentsP)
|
|||||||
<|> flag R.Split R.JSON (long "json" <> help "output a json diff")
|
<|> flag R.Split R.JSON (long "json" <> help "output a json diff")
|
||||||
<|> flag' R.Split (long "split" <> help "output a split diff")
|
<|> flag' R.Split (long "split" <> help "output a split diff")
|
||||||
<|> flag' R.Summary (long "summary" <> help "output a diff summary")
|
<|> flag' R.Summary (long "summary" <> help "output a diff summary")
|
||||||
<|> flag' R.SExpression (long "sexpression" <> help "output an s-expression diff tree"))
|
<|> flag' R.SExpression (long "sexpression" <> help "output an s-expression diff tree")
|
||||||
|
<|> flag' R.TOC (long "toc" <> help "output a table of contents diff summary"))
|
||||||
<*> optional (option auto (long "timeout" <> help "timeout for per-file diffs in seconds, defaults to 7 seconds"))
|
<*> optional (option auto (long "timeout" <> help "timeout for per-file diffs in seconds, defaults to 7 seconds"))
|
||||||
<*> optional (strOption (long "output" <> short 'o' <> help "output directory for split diffs, defaults to stdout if unspecified"))
|
<*> optional (strOption (long "output" <> short 'o' <> help "output directory for split diffs, defaults to stdout if unspecified"))
|
||||||
<*> switch (long "no-index" <> help "compare two paths on the filesystem")
|
<*> switch (long "no-index" <> help "compare two paths on the filesystem")
|
||||||
|
Loading…
Reference in New Issue
Block a user