Messages: ensure disabled messages aren't computed

This commit is contained in:
Louis Gesbert 2024-05-03 15:13:08 +02:00
parent 396ea03ff9
commit 19672d2305

View File

@ -352,6 +352,12 @@ let make
?(suggestion = [])
~cont
~level =
match level with
| Debug when not Global.options.debug ->
Format.ikfprintf (fun _ -> cont [] level) (Lazy.force ignore_ppf)
| Warning when Global.options.disable_warnings ->
Format.ikfprintf (fun _ -> cont [] level) (Lazy.force ignore_ppf)
| _ ->
Format.kdprintf
@@ fun message ->
let t =