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 = ...@@ -206,6 +206,7 @@ let gen_status ip =
Sarif_result.create ~ruleId:user_annot_id ~level ~locations ~message () Sarif_result.create ~ruleId:user_annot_id ~level ~locations ~message ()
let gen_statuses () = let gen_statuses () =
let cmp = Property.Ordered_by_function.compare in
let f ip content = let f ip content =
let exclude = let exclude =
is_alarm ip || is_alarm ip ||
...@@ -213,7 +214,7 @@ let gen_statuses () = ...@@ -213,7 +214,7 @@ let gen_statuses () =
in in
if exclude then content else (gen_status ip) :: content if exclude then content else (gen_status ip) :: content
in in
List.rev (Property_status.fold f []) List.rev (Property_status.fold_sorted ~cmp f [])
let gen_artifacts () = let gen_artifacts () =
let add_src_file f = let add_src_file f =
......
...@@ -120,7 +120,9 @@ ...@@ -120,7 +120,9 @@
"ruleId": "user-spec", "ruleId": "user-spec",
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "text": "assigns clause in function printf." }, "message": {
"text": "reachability of stmt line 27 in getValueFromArray."
},
"locations": [ "locations": [
{ {
"physicalLocation": { "physicalLocation": {
...@@ -131,8 +133,8 @@ ...@@ -131,8 +133,8 @@
"region": { "region": {
"startLine": 27, "startLine": 27,
"endLine": 27, "endLine": 27,
"endColumn": 6, "endColumn": 38,
"byteLength": 6 "byteLength": 38
} }
} }
} }
...@@ -165,9 +167,7 @@ ...@@ -165,9 +167,7 @@
"ruleId": "user-spec", "ruleId": "user-spec",
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": { "text": "behavior default! in function printf." },
"text": "from clause of term \\result in function printf."
},
"locations": [ "locations": [
{ {
"physicalLocation": { "physicalLocation": {
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
"ruleId": "user-spec", "ruleId": "user-spec",
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "text": "behavior default! in function printf." }, "message": { "text": "assigns clause in function printf." },
"locations": [ "locations": [
{ {
"physicalLocation": { "physicalLocation": {
...@@ -212,7 +212,7 @@ ...@@ -212,7 +212,7 @@
"kind": "pass", "kind": "pass",
"level": "none", "level": "none",
"message": { "message": {
"text": "reachability of stmt line 27 in getValueFromArray." "text": "from clause of term \\result in function printf."
}, },
"locations": [ "locations": [
{ {
...@@ -224,8 +224,8 @@ ...@@ -224,8 +224,8 @@
"region": { "region": {
"startLine": 27, "startLine": 27,
"endLine": 27, "endLine": 27,
"endColumn": 38, "endColumn": 6,
"byteLength": 38 "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