Skip to content

Commit

Permalink
Avoid a duplication in some TOML-related project diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
nberth committed Oct 25, 2023
1 parent 3d6e697 commit 88a72e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lsp/superbol_project/project_diagnostics.ml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ let pp_error ppf = function
(* Here we ignore the message as most error messages from `toml` just
repeat source location information. *)
Pretty.print ppf "%s:%d,%d: Syntax error" source line column
| Invalid_config { loc = Toml_file filename; msg } ->
Pretty.print ppf "%s: %s" filename msg
| Invalid_config { loc = _(* Toml_file filename *); msg } ->
(* Here the message from `toml` contains enough source information as
well. *)
Pretty.string ppf msg
| Unknown_dialect name ->
Pretty.print ppf "Unknown@ dialect: `%s'" name
| Cobol_config_error e ->
Expand Down

0 comments on commit 88a72e9

Please sign in to comment.