nimble_csv icon indicating copy to clipboard operation
nimble_csv copied to clipboard

Dialyzer error in newlines_separator!

Open Munksgaard opened this issue 1 year ago • 1 comments

When running dialyzer in my project (which relies on nimble_csv), I get the following error:

deps/nimble_csv/lib/nimble_csv.ex:523:unmatched_return
The expression produces a value of type:

[integer(), ...]

but this value is unmatched.

By adding dialyzer to this repo with the following settings, I can confirm that the problem is in nimble_csv:

dialyzer: [
  flags: [:unmatched_returns, :error_handling, :extra_return, :missing_return, :underspecs],
  plt_file: {:no_warn, "priv/plts/nimble_csv.plt"},
  plt_core_path: "priv/plts/core.plt",
]

While the error points at this line, it's clear the the missing match occurs somewhere within newlines_separator!.

Munksgaard avatar Feb 20 '24 11:02 Munksgaard

We don't use dialyzer in this project, but a PR is welcome if you want to address the issue. Maybe adding quote generated: true do to some of the code generation will address it.

josevalim avatar Feb 20 '24 11:02 josevalim