@@ -248,12 +248,24 @@ let add m =
248
248
Table .add m
249
249
)
250
250
251
+ let final_table : unit Table.MH .t = Table.MH .create 13
252
+
253
+ let add_final m =
254
+ Table.MH .replace final_table m ()
255
+
251
256
let finalize () =
252
257
if get_bool "warn.deterministic" then (
253
258
! Table .messages_list
254
259
|> List .sort Message .compare
255
260
|> List .iter print
256
- )
261
+ );
262
+ Table.MH .to_seq_keys final_table
263
+ |> List .of_seq
264
+ |> List .sort Message .compare
265
+ |> List .iter (fun m ->
266
+ print m ;
267
+ Table .add m
268
+ )
257
269
258
270
let current_context : ControlSpecC .t option ref = ref None
259
271
@@ -282,7 +294,7 @@ let msg_noloc severity ?(tags=[]) ?(category=Category.Unknown) fmt =
282
294
if ! AnalysisState .should_warn && Severity .should_warn severity && (Category .should_warn category || Tags .should_warn tags ) then (
283
295
let finish doc =
284
296
let text = GobPretty .show doc in
285
- add {tags = Category category :: tags ; severity; multipiece = Single {loc = None ; text; context = msg_context () }}
297
+ add {tags = Category category :: tags ; severity; multipiece = Single {loc = None ; text; context = None }}
286
298
in
287
299
Pretty .gprintf finish fmt
288
300
)
@@ -316,4 +328,15 @@ let debug_noloc ?tags = msg_noloc Debug ?tags
316
328
let success ?loc = msg Success ?loc
317
329
let success_noloc ?tags = msg_noloc Success ?tags
318
330
331
+ let msg_final severity ?(tags =[] ) ?(category =Category. Unknown ) fmt =
332
+ if ! AnalysisState .should_warn then (
333
+ let finish doc =
334
+ let text = GobPretty .show doc in
335
+ add_final {tags = Category category :: tags ; severity; multipiece = Single {loc = None ; text; context = None }}
336
+ in
337
+ Pretty .gprintf finish fmt
338
+ )
339
+ else
340
+ GobPretty .igprintf () fmt
341
+
319
342
include Tracing
0 commit comments