From 2668ef33c1231785076fc2486b41cbe4ce8cdecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Mon, 28 Oct 2019 11:59:18 +0100 Subject: [PATCH] [mdr] fix message plain intro --- src/plugins/markdown-report/md_gen.ml | 6 ++++-- src/plugins/markdown-report/tests/eva/oracle/cwe126.0.md | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/plugins/markdown-report/md_gen.ml b/src/plugins/markdown-report/md_gen.ml index a72088f49b7..922ec4988e3 100644 --- a/src/plugins/markdown-report/md_gen.ml +++ b/src/plugins/markdown-report/md_gen.ml @@ -370,9 +370,11 @@ let section_event is_err env nb event = insert_marks env lab else insert_remark env lab in - let pp_warning fmt msg = Format.fprintf fmt "Message: %s" msg in H2 (plain title, Some lab) - :: Block (codeblock "log" pp_warning event.evt_message) + :: Block ( + (text @@ plain "Message:") @ + codeblock "log" Format.pp_print_string event.evt_message + ) :: content let make_events_list is_err env l = diff --git a/src/plugins/markdown-report/tests/eva/oracle/cwe126.0.md b/src/plugins/markdown-report/tests/eva/oracle/cwe126.0.md index bfafd8867c7..385f456c3f7 100644 --- a/src/plugins/markdown-report/tests/eva/oracle/cwe126.0.md +++ b/src/plugins/markdown-report/tests/eva/oracle/cwe126.0.md @@ -1,7 +1,7 @@ --- title: Frama-C Analysis Report author: -date: 2019-10-25 +date: 2019-10-28 ... \let\underscore\_ @@ -65,11 +65,14 @@ Table: Warning reported by Frama-C ## Warning 0 (tests/eva/cwe126.c:28) {#warn-0} +Message: + ```log -Message: out of bounds read. assert \valid_read(data + i); +out of bounds read. assert \valid_read(data + i); ``` + # Results of the analysis {#alarms} The table below lists the alarm that have been emitted during the analysis. -- GitLab