From ad7028cb49d8b44fb36f1f0b5e45f37f67ae2648 Mon Sep 17 00:00:00 2001 From: Dulma Churchill Date: Thu, 15 Jun 2017 05:14:26 -0700 Subject: [PATCH] [printing] Make sure that error messages end in a dot. Reviewed By: jberdine Differential Revision: D5247778 fbshipit-source-id: 2f27338 --- infer/src/backend/InferPrint.re | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/infer/src/backend/InferPrint.re b/infer/src/backend/InferPrint.re index 5cd57b98b..56039b31f 100644 --- a/infer/src/backend/InferPrint.re +++ b/infer/src/backend/InferPrint.re @@ -60,7 +60,16 @@ let error_advice_to_csv_string error_desc => { let error_desc_to_plain_string error_desc => { let pp fmt => F.fprintf fmt "%a" Localise.pp_error_desc error_desc; - F.asprintf "%t" pp + let s = F.asprintf "%t" pp; + let s = String.strip s; + let s = + /* end error description with a dot */ + if (String.is_suffix suffix::"." s) { + s + } else { + s ^ "." + }; + s }; let error_desc_to_dotty_string error_desc => Localise.error_desc_get_dotty error_desc;