Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
frama-c
Commits
17b9a5b7
Commit
17b9a5b7
authored
Oct 08, 2020
by
Andre Maroneze
💬
Committed by
Virgile Prevosto
Oct 19, 2020
Browse files
[Markdown-report] placate SARIF validator
parent
0c093eba
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/markdown-report/sarif.ml
View file @
17b9a5b7
...
...
@@ -460,6 +460,7 @@ module Driver = struct
semanticVersion
:
(
string
[
@
default
""
]);
fileVersion
:
(
string
[
@
default
""
]);
downloadUri
:
(
string
[
@
default
""
]);
informationUri
:
(
string
[
@
default
""
]);
sarifLoggerVersion
:
(
string
[
@
default
""
]);
language
:
(
string
[
@
default
"en-US"
]);
properties
:
(
Properties
.
t
[
@
default
Properties
.
default
]);
...
...
@@ -472,13 +473,14 @@ module Driver = struct
?
(
semanticVersion
=
""
)
?
(
fileVersion
=
""
)
?
(
downloadUri
=
""
)
?
(
informationUri
=
""
)
?
(
sarifLoggerVersion
=
""
)
?
(
language
=
"en-US"
)
?
(
properties
=
Properties
.
default
)
()
=
{
name
;
fullName
;
version
;
semanticVersion
;
fileVersion
;
downloadUri
;
sarifLoggerVersion
;
language
;
properties
}
downloadUri
;
informationUri
;
sarifLoggerVersion
;
language
;
properties
}
let
default
=
create
~
name
:
""
()
end
...
...
src/plugins/markdown-report/sarif_gen.ml
View file @
17b9a5b7
...
...
@@ -28,8 +28,10 @@ let frama_c_sarif =
let
semanticVersion
=
Fc_config
.
version
in
let
fullName
=
name
^
"-"
^
version
in
let
downloadUri
=
"https://frama-c.com/download.html"
in
let
informationUri
=
"https://frama-c.com"
in
Tool
.
create
(
Driver
.
create
~
name
~
version
~
semanticVersion
~
fullName
~
downloadUri
()
)
(
Driver
.
create
~
name
~
version
~
semanticVersion
~
fullName
~
downloadUri
~
informationUri
()
)
let
get_remarks
()
=
let
f
=
Mdr_params
.
Remarks
.
get
()
in
...
...
@@ -226,7 +228,7 @@ let gen_run remarks =
let
uriBases
=
(
"PWD"
,
Sys
.
getcwd
()
)
::
Filepath
.
all_symbolic_dirs
()
in
let
uriBasesJson
=
List
.
fold_left
(
fun
acc
(
name
,
dir
)
->
(
name
,
`Assoc
[(
"uri"
,
`String
dir
)])
::
acc
(
name
,
`Assoc
[(
"uri"
,
`String
(
"file://"
^
dir
^
"/"
)
)])
::
acc
)
[]
uriBases
in
let
originalUriBaseIds
=
...
...
src/plugins/markdown-report/tests/sarif/oracle/with-libc.sarif.clean
View file @
17b9a5b7
...
...
@@ -10,7 +10,8 @@
"fullName": "frama-c-21.1+dev (Scandium)",
"version": "21.1+dev (Scandium)",
"semanticVersion": "21.1+dev",
"downloadUri": "https://frama-c.com/download.html"
"downloadUri": "https://frama-c.com/download.html",
"informationUri": "https://frama-c.com"
}
},
"invocations": [
...
...
@@ -28,11 +29,14 @@
}
],
"originalUriBaseIds": {
"FRAMAC_SHARE": { "uri": "REPLACED_FOR_PTESTS_FRAMAC_SHARE" },
"FRAMAC_LIB": { "uri": "REPLACED_FOR_PTESTS_FRAMAC_LIB" },
"FRAMAC_PLUGIN": { "uri": "REPLACED_FOR_PTESTS_FRAMAC_PLUGIN" },
"FRAMAC_SHARE": { "uri": "file://REPLACED_FOR_PTESTS_FRAMAC_SHARE/" },
"FRAMAC_LIB": { "uri": "file://REPLACED_FOR_PTESTS_FRAMAC_LIB/" },
"FRAMAC_PLUGIN": {
"uri": "file://REPLACED_FOR_PTESTS_FRAMAC_PLUGIN/"
},
"PWD": {
"uri": "REPLACED_FOR_PTESTS_PWD"
"uri":
"file://REPLACED_FOR_PTESTS_PWD/"
}
},
"artifacts": [
...
...
src/plugins/markdown-report/tests/sarif/oracle/without-libc.sarif.clean
View file @
17b9a5b7
...
...
@@ -10,7 +10,8 @@
"fullName": "frama-c-21.1+dev (Scandium)",
"version": "21.1+dev (Scandium)",
"semanticVersion": "21.1+dev",
"downloadUri": "https://frama-c.com/download.html"
"downloadUri": "https://frama-c.com/download.html",
"informationUri": "https://frama-c.com"
}
},
"invocations": [
...
...
@@ -28,11 +29,14 @@
}
],
"originalUriBaseIds": {
"FRAMAC_SHARE": { "uri": "REPLACED_FOR_PTESTS_FRAMAC_SHARE" },
"FRAMAC_LIB": { "uri": "REPLACED_FOR_PTESTS_FRAMAC_LIB" },
"FRAMAC_PLUGIN": { "uri": "REPLACED_FOR_PTESTS_FRAMAC_PLUGIN" },
"FRAMAC_SHARE": { "uri": "file://REPLACED_FOR_PTESTS_FRAMAC_SHARE/" },
"FRAMAC_LIB": { "uri": "file://REPLACED_FOR_PTESTS_FRAMAC_LIB/" },
"FRAMAC_PLUGIN": {
"uri": "file://REPLACED_FOR_PTESTS_FRAMAC_PLUGIN/"
},
"PWD": {
"uri": "REPLACED_FOR_PTESTS_PWD"
"uri":
"file://REPLACED_FOR_PTESTS_PWD/"
}
},
"artifacts": [
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment