Make --todo-marker take a required argument

This commit is contained in:
Alexander Kobjolke 2022-03-10 20:24:14 +01:00
parent 3c43cd7c5d
commit 119378c344

View file

@ -100,7 +100,7 @@ options =
(OptArg (\f opts -> opts { contextLines = fromMaybe 0 (f >>= readMaybe) }) "NUM") (OptArg (\f opts -> opts { contextLines = fromMaybe 0 (f >>= readMaybe) }) "NUM")
"specify how much context should be shown around a violation" "specify how much context should be shown around a violation"
, Option ['t'] ["todo-marker"] , Option ['t'] ["todo-marker"]
(OptArg (\f opts -> opts { todoMarker = fromMaybe "TODO" f }) "STRING") (ReqArg (\f opts -> opts { todoMarker = f }) "STRING")
"override the default TODO marker with a custom string" "override the default TODO marker with a custom string"
, Option ['A'] ["annotations"] , Option ['A'] ["annotations"]
(ReqArg (\f opts -> opts { annotationFiles = (nub $ annotationFiles opts ++ [f]) }) "FILE") (ReqArg (\f opts -> opts { annotationFiles = (nub $ annotationFiles opts ++ [f]) }) "FILE")