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
5104d394
Commit
5104d394
authored
6 years ago
by
Virgile Prevosto
Browse files
Options
Downloads
Patches
Plain Diff
[sarif] slightly more json generated
parent
596e38e8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/markdown-report/sarif.ml
+58
-27
58 additions, 27 deletions
src/plugins/markdown-report/sarif.ml
src/plugins/markdown-report/sarif_gen.ml
+7
-2
7 additions, 2 deletions
src/plugins/markdown-report/sarif_gen.ml
with
65 additions
and
29 deletions
src/plugins/markdown-report/sarif.ml
+
58
−
27
View file @
5104d394
...
@@ -379,33 +379,64 @@ type t = {
...
@@ -379,33 +379,64 @@ type t = {
properties
:
(
Properties
.
t
[
@
default
Properties
.
default
]);
properties
:
(
Properties
.
t
[
@
default
Properties
.
default
]);
}[
@@
deriving
yojson
]
}[
@@
deriving
yojson
]
let
default
=
{
let
create
commandLine
=
"/bin/cat"
;
~
commandLine
arguments
=
[]
;
?
(
arguments
=
[]
)
responseFiles
=
[]
;
?
(
responseFiles
=
[]
)
attachments
=
[]
;
?
(
attachments
=
[]
)
startTime
=
""
;
?
(
startTime
=
""
)
endTime
=
""
;
?
(
endTime
=
""
)
exitCode
=
0
;
?
(
exitCode
=
0
)
toolNotifications
=
[]
;
?
(
toolNotifications
=
[]
)
configurationNotifications
=
[]
;
?
(
configurationNotifications
=
[]
)
exitCodeDescription
=
""
;
?
(
exitCodeDescription
=
""
)
exitSignalName
=
""
;
?
(
exitSignalName
=
""
)
exitSignalNumber
=
0
;
?
(
exitSignalNumber
=
0
)
processStartFailureMessage
=
""
;
?
(
processStartFailureMessage
=
""
)
toolExecutionSuccessful
=
true
;
?
(
toolExecutionSuccessful
=
true
)
machine
=
""
;
?
(
machine
=
""
)
account
=
""
;
?
(
account
=
""
)
processId
=
0
;
?
(
processId
=
0
)
executableLocation
=
FileLocation
.
default
;
?
(
executableLocation
=
FileLocation
.
default
)
workingDirectory
=
FileLocation
.
default
;
?
(
workingDirectory
=
FileLocation
.
default
)
environmentVariables
=
Additional_properties
.
default
;
?
(
environmentVariables
=
Additional_properties
.
default
)
stdin
=
FileLocation
.
default
;
?
(
stdin
=
FileLocation
.
default
)
stdout
=
FileLocation
.
default
;
?
(
stdout
=
FileLocation
.
default
)
stderr
=
FileLocation
.
default
;
?
(
stderr
=
FileLocation
.
default
)
stdoutStderr
=
FileLocation
.
default
;
?
(
stdoutStderr
=
FileLocation
.
default
)
properties
=
Properties
.
default
;
?
(
properties
=
Properties
.
default
)
}
()
=
{
commandLine
;
arguments
;
responseFiles
;
attachments
;
startTime
;
endTime
;
exitCode
;
toolNotifications
;
configurationNotifications
;
exitCodeDescription
;
exitSignalName
;
exitSignalNumber
;
processStartFailureMessage
;
toolExecutionSuccessful
;
machine
;
account
;
processId
;
executableLocation
;
workingDirectory
;
environmentVariables
;
stdin
;
stdout
;
stderr
;
stdoutStderr
;
properties
;
}
let
default
=
create
~
commandLine
:
"/bin/true"
()
end
end
module
Conversion
=
struct
module
Conversion
=
struct
...
...
This diff is collapsed.
Click to expand it.
src/plugins/markdown-report/sarif_gen.ml
+
7
−
2
View file @
5104d394
...
@@ -6,7 +6,7 @@ let frama_c_sarif =
...
@@ -6,7 +6,7 @@ let frama_c_sarif =
let
semanticVersion
=
Config
.
version
in
let
semanticVersion
=
Config
.
version
in
let
fullName
=
name
^
"-"
^
version
in
let
fullName
=
name
^
"-"
^
version
in
let
downloadUri
=
"https://frama-c.com/download.html"
in
let
downloadUri
=
"https://frama-c.com/download.html"
in
let
sarifLoggerVersion
=
Mdr_
params
.
version
in
let
sarifLoggerVersion
=
Mdr_
version
.
version
in
Tool
.
create
Tool
.
create
~
name
~
version
~
semanticVersion
~
name
~
version
~
semanticVersion
~
fullName
~
downloadUri
~
sarifLoggerVersion
()
~
fullName
~
downloadUri
~
sarifLoggerVersion
()
...
@@ -16,9 +16,14 @@ let get_remarks () =
...
@@ -16,9 +16,14 @@ let get_remarks () =
if
f
<>
""
then
Parse_remarks
.
get_remarks
f
if
f
<>
""
then
Parse_remarks
.
get_remarks
f
else
Datatype
.
String
.
Map
.
empty
else
Datatype
.
String
.
Map
.
empty
let
gen_invocation
()
=
let
commandLine
=
Array
.
fold_right
(
fun
s
acc
->
s
^
" "
^
acc
)
Sys
.
argv
""
in
let
arguments
=
List
.
tl
(
Array
.
to_list
Sys
.
argv
)
in
Invocation
.
create
~
commandLine
~
arguments
()
let
gen_run
()
=
let
gen_run
()
=
let
tool
=
frama_c_sarif
in
let
tool
=
frama_c_sarif
in
let
invocations
=
[]
in
let
invocations
=
[
gen_invocation
()
]
in
Run
.
create
~
tool
~
invocations
()
Run
.
create
~
tool
~
invocations
()
let
generate
()
=
let
generate
()
=
...
...
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