diff options
author | Chimrod <> | 2023-11-05 11:23:08 +0100 |
---|---|---|
committer | Chimrod <> | 2023-11-05 11:23:08 +0100 |
commit | 1128450d0b52c09e78d64df5737b8a034b3e230c (patch) | |
tree | 9961b47c91e0530dcd6829833da1cc05b42b8ac2 /bin/qsp_parser.ml | |
parent | 6ada3862d96f82e44b3b19dd84d08cbb8c6a6006 (diff) |
Fixup in the --help message
Diffstat (limited to 'bin/qsp_parser.ml')
-rw-r--r-- | bin/qsp_parser.ml | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/qsp_parser.ml b/bin/qsp_parser.ml index 1b2b90c..70f474e 100644 --- a/bin/qsp_parser.ml +++ b/bin/qsp_parser.ml @@ -48,7 +48,7 @@ let pp_modules formatter = (* Print the name, left justified, with enought spaces for the all the identifiers *) - Format.fprintf formatter "%-*s" (max_length + 1) "Name"; + Format.fprintf formatter "%-*s" (succ max_length) "Name"; (* Tab delimiter *) Format.pp_set_tab formatter (); Format.fprintf formatter "Active "; @@ -65,6 +65,10 @@ let pp_modules formatter = Format.pp_close_tbox formatter (); Format.pp_print_break formatter 0 0 +(** Get all the tests to apply. + + The expression is declared lazy in order to be sure to apply the filters + from the command line before. *) let checkers : (module Qsp_syntax.S.Analyzer) Lazy.t = lazy (let module Check = Qsp_syntax.Check.Make (struct @@ -102,14 +106,14 @@ let parse_location : ctx:ctx -> Qparser.Lexbuf.t -> Args.filters -> ctx = List.fold_left report ~init:ctx ~f:(fun ctx report -> match report.Report.level with - | Error -> { ctx with error_nb = ctx.error_nb + 1 } - | Warn -> { ctx with warn_nb = ctx.warn_nb + 1 } - | Debug -> { ctx with debug_nb = ctx.debug_nb + 1 })) + | Error -> { ctx with error_nb = succ ctx.error_nb } + | Warn -> { ctx with warn_nb = succ ctx.warn_nb } + | Debug -> { ctx with debug_nb = succ ctx.debug_nb })) | Error e -> let start_position, _ = Qparser.Lexbuf.positions lexbuf in Format.fprintf Format.std_formatter "Location@ %s@;@[%a]@." start_position.Lexing.pos_fname Report.pp e; - { ctx with error_nb = ctx.error_nb + 1 } + { ctx with error_nb = succ ctx.error_nb } let default_ctx = { error_nb = 0; warn_nb = 0; debug_nb = 0 } |