diff --git a/src/plugins/markdown-report/Report_markdown.mli b/src/plugins/markdown-report/Report_markdown.mli index 1359dd68361d4dd49af8335dfad508d5a5bef68b..5edadb17f3d262f95707642b7b094be1231d1dfe 100644 --- a/src/plugins/markdown-report/Report_markdown.mli +++ b/src/plugins/markdown-report/Report_markdown.mli @@ -19,6 +19,9 @@ module FlameGraph: Parameter_sig.String (** Value of [-mdr-authors]. *) module Authors: Parameter_sig.String_list +(** Value of [-mdr-title]. *) +module Title: Parameter_sig.String + (** Value of [-mdr-stubs]. *) module Stubs: Parameter_sig.String_list end diff --git a/src/plugins/markdown-report/md_gen.ml b/src/plugins/markdown-report/md_gen.ml index fbeb5e0df12720b9eae1220f899560281b1680c5..37fcddd4ad1721438ebb0d9a439d333254e7eae1 100644 --- a/src/plugins/markdown-report/md_gen.ml +++ b/src/plugins/markdown-report/md_gen.ml @@ -525,11 +525,14 @@ let gen_report is_draft = let context = gen_context env in let coverage = gen_coverage env in let alarms = gen_alarms env in + let title = Mdr_params.Title.get () in let title = - if is_draft then - plain "Frama-C Analysis Report" - else - plain "Draft report" + if title = "" then begin + if is_draft then + plain "Draft report" + else + plain "Frama-C Analysis Report" + end else plain title in let authors = List.map (fun x -> plain x) (Mdr_params.Authors.get ()) in let date = mk_date () in diff --git a/src/plugins/markdown-report/mdr_params.ml b/src/plugins/markdown-report/mdr_params.ml index cc2b0d1f774acc86f98e64071094a0970766ce72..188830f2ac969958ec35ac77fef56d55bc31854c 100644 --- a/src/plugins/markdown-report/mdr_params.ml +++ b/src/plugins/markdown-report/mdr_params.ml @@ -57,6 +57,14 @@ struct let help = "list of authors of the report" end) +module Title = Empty_string( +struct + let option_name = "-mdr-title" + let arg_name = "t" + let help = "title of the generated document" +end +) + module Stubs = String_list( struct let option_name = "-mdr-stubs" diff --git a/src/plugins/markdown-report/mdr_params.mli b/src/plugins/markdown-report/mdr_params.mli index 9671bc092fbe276ef8e0281a3e8d60f8fc8b4fc8..993fcafd394dfe9be25543aadff7638e28e18045 100644 --- a/src/plugins/markdown-report/mdr_params.mli +++ b/src/plugins/markdown-report/mdr_params.mli @@ -18,5 +18,8 @@ module FlameGraph: Parameter_sig.String (** Value of [-mdr-authors]. *) module Authors: Parameter_sig.String_list +(** Value of [-mdr-title]. *) +module Title: Parameter_sig.String + (** Value of [-mdr-stubs]. *) module Stubs: Parameter_sig.String_list