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
db63b5b0
Commit
db63b5b0
authored
5 years ago
by
Virgile Prevosto
Browse files
Options
Downloads
Patches
Plain Diff
[sarif] Enforce compatibility with online validator
parent
0a2f8144
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/sarif_gen.ml
+23
-4
23 additions, 4 deletions
src/plugins/markdown-report/sarif_gen.ml
with
23 additions
and
4 deletions
src/plugins/markdown-report/sarif_gen.ml
+
23
−
4
View file @
db63b5b0
...
@@ -27,13 +27,32 @@ let gen_invocation () =
...
@@ -27,13 +27,32 @@ let gen_invocation () =
let
arguments
=
List
.
tl
(
Array
.
to_list
Sys
.
argv
)
in
let
arguments
=
List
.
tl
(
Array
.
to_list
Sys
.
argv
)
in
Invocation
.
create
~
commandLine
~
arguments
()
Invocation
.
create
~
commandLine
~
arguments
()
let
gen_remark
alarm
=
let
open
Markdown
in
[
Block
[
Text
(
plain
(
Printf
.
sprintf
"This alarms represents a potential %s."
(
Alarms
.
get_description
alarm
)
)
)
]
]
let
make_message
alarm
annot
remark
=
let
make_message
alarm
annot
remark
=
let
open
Markdown
in
let
open
Markdown
in
let
kind
=
plain
(
Alarms
.
get_name
alarm
^
":"
)
in
let
name
=
Alarms
.
get_name
alarm
in
let
text
=
name
^
"."
in
let
kind
=
plain
(
name
^
":"
)
in
let
descr
=
codelines
"acsl"
Printer
.
pp_code_annotation
annot
in
let
descr
=
codelines
"acsl"
Printer
.
pp_code_annotation
annot
in
let
summary
=
Block
[
Text
kind
;
descr
]
in
let
summary
=
Block
[
Text
kind
;
descr
]
in
let
markdown
=
summary
::
remark
in
let
markdown
=
Message
.
markdown
~
markdown
()
match
remark
with
|
[]
->
summary
::
gen_remark
alarm
|
_
->
summary
::
remark
in
let
richText
=
Format
.
asprintf
"@[%a@]"
Markdown
.
pp_elements
markdown
in
Message
.
create
~
text
~
richText
()
let
gen_results
remarks
=
let
gen_results
remarks
=
let
treat_alarm
_e
_kf
s
~
rank
:_
alarm
annot
(
i
,
content
)
=
let
treat_alarm
_e
_kf
s
~
rank
:_
alarm
annot
(
i
,
content
)
=
...
@@ -65,7 +84,7 @@ let level_of_status =
...
@@ -65,7 +84,7 @@ let level_of_status =
|
Inconsistent
->
note
|
Inconsistent
->
note
let
make_ip_message
ip
=
let
make_ip_message
ip
=
let
text
=
Format
.
asprintf
"@[%a@]"
Property
.
short_pretty
ip
in
let
text
=
Format
.
asprintf
"@[%a
.
@]"
Property
.
short_pretty
ip
in
Message
.
plain_text
~
text
()
Message
.
plain_text
~
text
()
let
gen_status
ip
=
let
gen_status
ip
=
...
...
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