Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dialyzer: enable -Wextra_return#1613

Draft
juped wants to merge 1 commit into
basefrom
ray/dialyzer-extra-return
Draft

dialyzer: enable -Wextra_return#1613
juped wants to merge 1 commit into
basefrom
ray/dialyzer-extra-return

Conversation

@juped
Copy link
Copy Markdown
Collaborator

@juped juped commented Nov 22, 2024

This warning checks for functions whose specs include extra types which
the function does not actually return.

@juped
Copy link
Copy Markdown
Collaborator Author

juped commented Nov 22, 2024

This one is a dubious check. It catches some things, but has false positives; a simple one:

lib/event_broker/filters.ex:8:extra_range
The type specification has too many types for the function.

Function:
EventBroker.Filters.Trivial.filter/2

Extra type:
false

Success typing:
true

This warning checks for functions whose specs include extra types which
the function does not actually return.
@juped juped force-pushed the ray/dialyzer-extra-return branch from b5d5995 to 0a42511 Compare January 14, 2025 15:28
@juped
Copy link
Copy Markdown
Collaborator Author

juped commented Jan 14, 2025

Against 0.30, this turns up a lot of errors, largely spurious; dialyzer infers a highly specific type and complains that our spec is more general. Leaning against.

@juped juped mentioned this pull request Jan 14, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: WIP

Development

Successfully merging this pull request may close these issues.

1 participant