add flag to skip printing notes

This commit is contained in:
rhiannon morris 2023-03-03 21:04:46 +01:00
parent 4dba693a5f
commit 9701ec3cd0
2 changed files with 35 additions and 25 deletions

View file

@ -43,16 +43,20 @@ record Options where
||| `-c`, `--color`, `--colour`:
||| colour code test results and a few other things.
||| this is not TAP compliant so it is off by default.
color : Bool
color : Bool
||| `-q`, `--skip-comments`:
||| skip printing comments in the output
skipComments : Bool
||| default options
||| (version 13 (because of `prove`), no filter, no colour)
export
defaultOpts : Options
defaultOpts = Opts {
version = V13,
pattern = Nothing,
color = False
version = V13,
pattern = Nothing,
color = False,
skipComments = False
}
||| value for each option.
@ -114,6 +118,11 @@ parameters (header : String)
description = "colour-code results (not TAP compliant)",
shortNames = ['c'], longNames = ["color", "colour"],
argDescr = NoArg $ pure . {color := True}
},
MkOpt {
description = "skip printing comments in the output",
shortNames = ['q'], longNames = ["skip-comments"],
argDescr = NoArg $ pure . {skipComments := True}
}
]