Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialyzer formatting #2894

Open
tsloughter opened this issue Jun 4, 2024 · 0 comments
Open

Dialyzer formatting #2894

tsloughter opened this issue Jun 4, 2024 · 0 comments
Labels
enhancement new behaviour or additional functionality help wanted unlikely to be tackled by core maintainers

Comments

@tsloughter
Copy link
Collaborator

This tweet about Typescript formatting https://x.com/t3dotgg/status/1796646449960390768 had me wondering if we could do the same for dialyzer. I've at times had to copy blocks of dialyzer warnings to an editor to break it up to be able to read.

@michalmuskala says https://github.com/jeremyjh/dialyxir does this, so it might be a good place to start looking for anyone interested in picking this up.

@ferd did great work on compilation errors, so that is also a good place to start, #2783

Line 49 Column 2: Invalid type specification for function otel_tracer:start_span/3. The success typing is ({_,_},_,_) -> any() but the spec is (integer(),opentelemetry:span_name(),otel_span:start_opts()) -> opentelemetry:span_ctx()
Line 49 Column 2: Invalid type specification for function otel_tracer:start_span/3. 

Type spec:

(integer(),opentelemetry:span_name(),otel_span:start_opts()) -> opentelemetry:span_ctx()

Does not match success type:

({_, _}, _, _) -> any() 

Something as simple as that may make it quicker to see the issue is the first argument should be {_, _} even though a diff of the two would give nothing being equivalent, so hard to tell at first glance where the wrong piece is.

A better example is when there are multiple large record or map mismatches.

@tsloughter tsloughter added enhancement new behaviour or additional functionality help wanted unlikely to be tackled by core maintainers labels Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new behaviour or additional functionality help wanted unlikely to be tackled by core maintainers
Projects
None yet
Development

No branches or pull requests

1 participant