aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorChimrod <>2024-01-04 08:18:39 +0100
committerChimrod <>2024-01-04 08:18:39 +0100
commit0f9f5d50bd04e23956e3c84359042659ed25149f (patch)
treed469c462b2a4e5441d0b9878f154b485c98f7f6b /bin
parent32cc150b5fc06e0c547b6d464cc6fa547ba874ba (diff)
Added return code to tell if everything is ok
Diffstat (limited to 'bin')
-rw-r--r--bin/qsp_parser.ml16
1 files changed, 8 insertions, 8 deletions
diff --git a/bin/qsp_parser.ml b/bin/qsp_parser.ml
index 70f474e..1e897a0 100644
--- a/bin/qsp_parser.ml
+++ b/bin/qsp_parser.ml
@@ -149,11 +149,11 @@ let () =
with Qparser.Lexer.EOF -> ()
in
- let () =
- match (!ctx.error_nb, !ctx.warn_nb) with
- | 0, 0 -> print_endline "No errors found"
- | _ ->
- Printf.printf "Found %d error(s), %d warning(s)\n" !ctx.error_nb
- !ctx.warn_nb
- in
- ()
+ match (!ctx.error_nb, !ctx.warn_nb) with
+ | 0, 0 ->
+ print_endline "No errors found";
+ exit 0
+ | _ ->
+ Printf.printf "Found %d error(s), %d warning(s)\n" !ctx.error_nb
+ !ctx.warn_nb;
+ exit 1