Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
490ec6c7
Commit
490ec6c7
authored
4 years ago
by
Andre Maroneze
Committed by
Virgile Prevosto
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[MdR] use report kind to set output extension
parent
52d32d5c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/markdown-report/mdr_params.ml
+22
-8
22 additions, 8 deletions
src/plugins/markdown-report/mdr_params.ml
with
22 additions
and
8 deletions
src/plugins/markdown-report/mdr_params.ml
+
22
−
8
View file @
490ec6c7
...
...
@@ -20,6 +20,8 @@
(* *)
(**************************************************************************)
module
Pervasives_string
=
String
include
Plugin
.
Register
(
struct
let
name
=
"Markdown report"
...
...
@@ -27,14 +29,6 @@ include Plugin.Register(
let
help
=
"generates a report in markdown format"
end
)
module
Output
=
String
(
struct
let
option_name
=
"-mdr-out"
let
arg_name
=
"f"
let
default
=
"report.md"
let
help
=
"sets the name of the output file to <f>"
end
)
module
Generate
=
String
(
struct
let
option_name
=
"-mdr-gen"
...
...
@@ -45,6 +39,26 @@ module Generate = String(
none (default), md, draft and sarif"
end
)
module
Output
:
Parameter_sig
.
String
=
struct
include
String
(
struct
let
option_name
=
"-mdr-out"
let
arg_name
=
"f"
let
default
=
"report"
let
help
=
"sets the name of the output file to <f>.@ \
If <f> has no extension, it is chosen automatically based on \
the report kind"
end
)
let
get
()
=
let
s
=
get
()
in
if
Pervasives_string
.
contains
(
Filename
.
basename
s
)
'.'
then
s
else
let
kind
=
Generate
.
get
()
in
let
ext
=
if
kind
=
"sarif"
then
".sarif"
else
".md"
in
s
^
ext
end
let
()
=
Generate
.
set_possible_values
[
"none"
;
"md"
;
"draft"
;
"sarif"
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment