Skip to content
Snippets Groups Projects
Commit bcd362f5 authored by Andre Maroneze's avatar Andre Maroneze
Browse files

[Metrics] ensure JSON output terminates with a newline

parent d7be6b9c
No related branches found
No related tags found
No related merge requests found
...@@ -745,7 +745,8 @@ let compute_on_cilast ~libc = ...@@ -745,7 +745,8 @@ let compute_on_cilast ~libc =
| Text -> pp_with_funinfo fmt cil_visitor | Text -> pp_with_funinfo fmt cil_visitor
| Json -> | Json ->
let json = json_of_funinfo cil_visitor in let json = json_of_funinfo cil_visitor in
Yojson.pretty_print fmt json Yojson.pretty_print fmt json;
Format.fprintf fmt "@." (* ensure the file ends with a newline *)
); );
close_out oc; close_out oc;
with Sys_error _ -> with Sys_error _ ->
......
...@@ -138,4 +138,4 @@ ...@@ -138,4 +138,4 @@
"__fc_stdout", "__fc_ttyname", "optarg", "opterr", "optind", "optopt" "__fc_stdout", "__fc_ttyname", "optarg", "opterr", "optind", "optopt"
], ],
"entry-points": [ "f", "main" ] "entry-points": [ "f", "main" ]
} }
\ No newline at end of file
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