aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/qsp_parser.ml16
-rw-r--r--readme.md4
2 files changed, 12 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
diff --git a/readme.md b/readme.md
index e6efa88..ce0f022 100644
--- a/readme.md
+++ b/readme.md
@@ -36,6 +36,10 @@ results will be printed in the standard output:
]
Found 0 error(s), 2 warning(s)
+### Return code
+
+The application will return the code `0` when all the tests are passed without
+errors or warnings and `1` otherwise.
## Checks provided