Skip to content
Snippets Groups Projects
Commit ea01e741 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[MdR] iterate over properties in fixed order for sarif output

parent 9440af4b
No related branches found
No related tags found
No related merge requests found
......@@ -206,6 +206,7 @@ let gen_status ip =
Sarif_result.create ~ruleId:user_annot_id ~level ~locations ~message ()
let gen_statuses () =
let cmp = Property.Ordered_by_function.compare in
let f ip content =
let exclude =
is_alarm ip ||
......@@ -213,7 +214,7 @@ let gen_statuses () =
in
if exclude then content else (gen_status ip) :: content
in
List.rev (Property_status.fold f [])
List.rev (Property_status.fold_sorted ~cmp f [])
let gen_artifacts () =
let add_src_file f =
......
......@@ -120,7 +120,9 @@
"ruleId": "user-spec",
"kind": "pass",
"level": "none",
"message": { "text": "assigns clause in function printf." },
"message": {
"text": "reachability of stmt line 27 in getValueFromArray."
},
"locations": [
{
"physicalLocation": {
......@@ -131,8 +133,8 @@
"region": {
"startLine": 27,
"endLine": 27,
"endColumn": 6,
"byteLength": 6
"endColumn": 38,
"byteLength": 38
}
}
}
......@@ -165,9 +167,7 @@
"ruleId": "user-spec",
"kind": "pass",
"level": "none",
"message": {
"text": "from clause of term \\result in function printf."
},
"message": { "text": "behavior default! in function printf." },
"locations": [
{
"physicalLocation": {
......@@ -189,7 +189,7 @@
"ruleId": "user-spec",
"kind": "pass",
"level": "none",
"message": { "text": "behavior default! in function printf." },
"message": { "text": "assigns clause in function printf." },
"locations": [
{
"physicalLocation": {
......@@ -212,7 +212,7 @@
"kind": "pass",
"level": "none",
"message": {
"text": "reachability of stmt line 27 in getValueFromArray."
"text": "from clause of term \\result in function printf."
},
"locations": [
{
......@@ -224,8 +224,8 @@
"region": {
"startLine": 27,
"endLine": 27,
"endColumn": 38,
"byteLength": 38
"endColumn": 6,
"byteLength": 6
}
}
}
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment