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
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
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
Charles Southerland
frama-c
Commits
37611ebd
Commit
37611ebd
authored
4 years ago
by
Virgile Prevosto
Browse files
Options
Downloads
Patches
Plain Diff
[MdR] keep tracks of all arguments when -save/-load sequences occur
parent
6ecaeac3
No related branches found
No related tags found
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
+18
-12
18 additions, 12 deletions
src/plugins/markdown-report/sarif_gen.ml
with
18 additions
and
12 deletions
src/plugins/markdown-report/sarif_gen.ml
+
18
−
12
View file @
37611ebd
...
...
@@ -47,24 +47,30 @@ let get_remark remarks label =
|
None
->
[]
|
Some
l
->
l
let
command_line
()
=
Array
.
to_list
Sys
.
argv
module
Analysis_cmdline
=
State_builder
.
R
ef
(
Datatype
.
List
(
Datatype
.
String
))
State_builder
.
List_r
ef
(
Datatype
.
List
(
Datatype
.
String
))
(
struct
let
name
=
"Sarif_gen.Analysis_cmdline"
let
dependencies
=
[]
let
default
=
command_line
end
)
let
command_line
()
=
Array
.
to_list
Sys
.
argv
let
update_cmdline
()
=
Analysis_cmdline
.
add
(
command_line
()
)
let
()
=
Cmdline
.
run_after_loading_stage
update_cmdline
let
gen_invocation
()
=
let
cl
=
Analysis_cmdline
.
get
()
in
(* The first argument is _always_ the binary name, but to avoid printing it
as an absolute path to binlevel.opt, we replace it with 'frama-c' *)
let
cl
=
"frama-c"
::
List
.
tl
cl
in
let
commandLine
=
String
.
concat
" "
cl
in
let
arguments
=
List
.
tl
cl
in
Invocation
.
create
~
commandLine
~
arguments
()
let
cls
=
Analysis_cmdline
.
get
()
in
let
gen_one
cl
=
(* The first argument is _always_ the binary name, but to avoid printing it
as an absolute path to binlevel.opt, we replace it with 'frama-c' *)
let
cl
=
"frama-c"
::
List
.
tl
cl
in
let
commandLine
=
String
.
concat
" "
cl
in
let
arguments
=
List
.
tl
cl
in
Invocation
.
create
~
commandLine
~
arguments
()
in
List
.
map
gen_one
cls
let
gen_remark
alarm
=
let
open
Markdown
in
...
...
@@ -215,7 +221,7 @@ let make_taxonomies rules = Datatype.String.Map.fold add_rule rules []
let
gen_run
remarks
=
let
tool
=
frama_c_sarif
()
in
let
name
=
"frama-c"
in
let
invocations
=
[
gen_invocation
()
]
in
let
invocations
=
gen_invocation
()
in
let
rules
,
results
=
gen_results
remarks
in
let
user_annot_results
=
gen_statuses
()
in
let
rules
=
...
...
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