From 838b709aff4caa587bd531e08e296345fdf047b7 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Tue, 22 Oct 2019 15:30:41 +0200 Subject: [PATCH] [headers] add headers for mdr files and new markdown module --- headers/headache_config.txt | 5 +++++ headers/header_spec.txt | 14 ++++++++++++ src/libraries/utils/markdown.ml | 22 +++++++++++++++++++ src/libraries/utils/markdown.mli | 22 +++++++++++++++++++ src/plugins/markdown-report/eva_coverage.ml | 22 +++++++++++++++++++ src/plugins/markdown-report/eva_coverage.mli | 22 +++++++++++++++++++ src/plugins/markdown-report/md_gen.ml | 22 +++++++++++++++++++ src/plugins/markdown-report/md_gen.mli | 22 +++++++++++++++++++ src/plugins/markdown-report/mdr_params.ml | 22 +++++++++++++++++++ src/plugins/markdown-report/mdr_params.mli | 22 +++++++++++++++++++ src/plugins/markdown-report/mdr_register.ml | 22 +++++++++++++++++++ src/plugins/markdown-report/mdr_register.mli | 22 +++++++++++++++++++ src/plugins/markdown-report/parse_remarks.ml | 22 +++++++++++++++++++ src/plugins/markdown-report/parse_remarks.mli | 22 +++++++++++++++++++ src/plugins/markdown-report/sarif.ml | 22 +++++++++++++++++++ src/plugins/markdown-report/sarif_gen.ml | 22 +++++++++++++++++++ src/plugins/markdown-report/sarif_gen.mli | 22 +++++++++++++++++++ src/plugins/markdown-report/share/acsl.xml | 22 +++++++++++++++++++ 18 files changed, 371 insertions(+) diff --git a/headers/headache_config.txt b/headers/headache_config.txt index 9bb003875b0..17a5e0df7c7 100644 --- a/headers/headache_config.txt +++ b/headers/headache_config.txt @@ -102,6 +102,11 @@ ######## | ".*\.htm.*" -> frame open: "<!--" line: "-" close: "-->" +######## +# XML # +######## +| ".*\.xml" -> frame open: "<!--" line: "-" close: "-->" + ####### # DTD # ####### diff --git a/headers/header_spec.txt b/headers/header_spec.txt index 3a00fb89591..7da183cfb30 100644 --- a/headers/header_spec.txt +++ b/headers/header_spec.txt @@ -873,6 +873,20 @@ src/plugins/loop_analysis/region_analysis_stmt.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/loop_analysis/region_analysis_stmt.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/loop_analysis/register.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/loop_analysis/slevel_analysis.ml: CEA_LGPL_OR_PROPRIETARY +src/plugins/markdown-report/eva_coverage.ml: CEA_LGPL +src/plugins/markdown-report/eva_coverage.mli: CEA_LGPL +src/plugins/markdown-report/md_gen.ml: CEA_LGPL +src/plugins/markdown-report/md_gen.mli: CEA_LGPL +src/plugins/markdown-report/mdr_params.ml: CEA_LGPL +src/plugins/markdown-report/mdr_params.mli: CEA_LGPL +src/plugins/markdown-report/mdr_register.ml: CEA_LGPL +src/plugins/markdown-report/mdr_register.mli: CEA_LGPL +src/plugins/markdown-report/parse_remarks.ml: CEA_LGPL +src/plugins/markdown-report/parse_remarks.mli: CEA_LGPL +src/plugins/markdown-report/sarif_gen.ml: CEA_LGPL +src/plugins/markdown-report/sarif_gen.mli: CEA_LGPL +src/plugins/markdown-report/sarif.ml: CEA_LGPL +src/plugins/markdown-report/share/acsl.xml: CEA_LGPL src/plugins/metrics/Metrics.mli: CEA_LGPL_OR_PROPRIETARY src/plugins/metrics/css_html.ml: CEA_LGPL_OR_PROPRIETARY src/plugins/metrics/metrics_acsl.ml: CEA_LGPL_OR_PROPRIETARY diff --git a/src/libraries/utils/markdown.ml b/src/libraries/utils/markdown.ml index e1fec7d81ef..c33efad4c87 100644 --- a/src/libraries/utils/markdown.ml +++ b/src/libraries/utils/markdown.ml @@ -1,3 +1,25 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + type align = Left | Center | Right type href = diff --git a/src/libraries/utils/markdown.mli b/src/libraries/utils/markdown.mli index 2cdef522113..b23a4edf766 100644 --- a/src/libraries/utils/markdown.mli +++ b/src/libraries/utils/markdown.mli @@ -1,3 +1,25 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + type align = Left | Center | Right type href = diff --git a/src/plugins/markdown-report/eva_coverage.ml b/src/plugins/markdown-report/eva_coverage.ml index 7faa651c5da..56b55d11303 100644 --- a/src/plugins/markdown-report/eva_coverage.ml +++ b/src/plugins/markdown-report/eva_coverage.ml @@ -1,3 +1,25 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + open Cil_types type coverage_stats = diff --git a/src/plugins/markdown-report/eva_coverage.mli b/src/plugins/markdown-report/eva_coverage.mli index 0decccbcc02..b90ba900cfc 100644 --- a/src/plugins/markdown-report/eva_coverage.mli +++ b/src/plugins/markdown-report/eva_coverage.mli @@ -1,2 +1,24 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + (** generates a coverage summary of EVA's run*) val md_gen: unit -> Markdown.element list diff --git a/src/plugins/markdown-report/md_gen.ml b/src/plugins/markdown-report/md_gen.ml index 0a6970b4093..538ff9f2eb2 100644 --- a/src/plugins/markdown-report/md_gen.ml +++ b/src/plugins/markdown-report/md_gen.ml @@ -1,3 +1,25 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + open Cil_types open Markdown diff --git a/src/plugins/markdown-report/md_gen.mli b/src/plugins/markdown-report/md_gen.mli index 503901ef440..57e15778a51 100644 --- a/src/plugins/markdown-report/md_gen.mli +++ b/src/plugins/markdown-report/md_gen.mli @@ -1,2 +1,24 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + (** generates the report (either final or [draft] according to the flag) *) val gen_report: draft:bool -> unit -> unit diff --git a/src/plugins/markdown-report/mdr_params.ml b/src/plugins/markdown-report/mdr_params.ml index 2b08c1783d0..9067772b108 100644 --- a/src/plugins/markdown-report/mdr_params.ml +++ b/src/plugins/markdown-report/mdr_params.ml @@ -1,3 +1,25 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + include Plugin.Register( struct let name = "Markdown report" diff --git a/src/plugins/markdown-report/mdr_params.mli b/src/plugins/markdown-report/mdr_params.mli index 4affc377045..8920d84ccca 100644 --- a/src/plugins/markdown-report/mdr_params.mli +++ b/src/plugins/markdown-report/mdr_params.mli @@ -1,3 +1,25 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + include Plugin.S (** Value of [-mdr-out]. *) diff --git a/src/plugins/markdown-report/mdr_register.ml b/src/plugins/markdown-report/mdr_register.ml index 77d5d70afd4..b9e23074135 100644 --- a/src/plugins/markdown-report/mdr_register.ml +++ b/src/plugins/markdown-report/mdr_register.ml @@ -1,3 +1,25 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + let main () = match Mdr_params.Generate.get () with | "none" -> () diff --git a/src/plugins/markdown-report/mdr_register.mli b/src/plugins/markdown-report/mdr_register.mli index bada67ad15e..001aa5fea6d 100644 --- a/src/plugins/markdown-report/mdr_register.mli +++ b/src/plugins/markdown-report/mdr_register.mli @@ -1 +1,23 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + (** Registration of the main entry point of the plug-in. Nothing is exported *) diff --git a/src/plugins/markdown-report/parse_remarks.ml b/src/plugins/markdown-report/parse_remarks.ml index 7622683507d..253bd34eadc 100644 --- a/src/plugins/markdown-report/parse_remarks.ml +++ b/src/plugins/markdown-report/parse_remarks.ml @@ -1,3 +1,25 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + type env = { mutable current_section: string; mutable is_markdown: bool; diff --git a/src/plugins/markdown-report/parse_remarks.mli b/src/plugins/markdown-report/parse_remarks.mli index d09e299ebfc..3ad98778499 100644 --- a/src/plugins/markdown-report/parse_remarks.mli +++ b/src/plugins/markdown-report/parse_remarks.mli @@ -1,3 +1,25 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + (** Parse skeleton files to add manually written comments to various parts of the report. *) diff --git a/src/plugins/markdown-report/sarif.ml b/src/plugins/markdown-report/sarif.ml index cdc0b9f85d7..46433ec05f3 100644 --- a/src/plugins/markdown-report/sarif.ml +++ b/src/plugins/markdown-report/sarif.ml @@ -1,3 +1,25 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + (** OCaml representation for the sarif 2.0 schema. *) (** ppx_deriving_yojson generates parser and printer that are recursive diff --git a/src/plugins/markdown-report/sarif_gen.ml b/src/plugins/markdown-report/sarif_gen.ml index 02b434d62ca..6f9c2143b92 100644 --- a/src/plugins/markdown-report/sarif_gen.ml +++ b/src/plugins/markdown-report/sarif_gen.ml @@ -1,3 +1,25 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + open Sarif let frama_c_sarif = diff --git a/src/plugins/markdown-report/sarif_gen.mli b/src/plugins/markdown-report/sarif_gen.mli index a3bd7165f7d..84592ecbe2d 100644 --- a/src/plugins/markdown-report/sarif_gen.mli +++ b/src/plugins/markdown-report/sarif_gen.mli @@ -1,2 +1,24 @@ +(**************************************************************************) +(* *) +(* This file is part of Frama-C. *) +(* *) +(* Copyright (C) 2007-2019 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + (** generate a sarif json object. *) val generate: unit -> unit diff --git a/src/plugins/markdown-report/share/acsl.xml b/src/plugins/markdown-report/share/acsl.xml index 0cd467cd748..385976a8cf9 100644 --- a/src/plugins/markdown-report/share/acsl.xml +++ b/src/plugins/markdown-report/share/acsl.xml @@ -1,3 +1,25 @@ +<!----------------------------------------------------------------------------> +<!-- --> +<!-- This file is part of Frama-C. --> +<!-- --> +<!-- Copyright (C) 2007-2019 --> +<!-- CEA (Commissariat à l'énergie atomique et aux énergies --> +<!-- alternatives) --> +<!-- --> +<!-- you can redistribute it and/or modify it under the terms of the GNU --> +<!-- Lesser General Public License as published by the Free Software --> +<!-- Foundation, version 2.1. --> +<!-- --> +<!-- It is distributed in the hope that it will be useful, --> +<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of --> +<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --> +<!-- GNU Lesser General Public License for more details. --> +<!-- --> +<!-- See the GNU Lesser General Public License version 2.1 --> +<!-- for more details (enclosed in the file licenses/LGPLv2.1). --> +<!-- --> +<!----------------------------------------------------------------------------> + <?xml version="1.0" encoding="UTF-8"?> <language name="ACSL" version="1" extensions="*.acsl" section="Sources" kateversion="2.4"> -- GitLab