Skip to content

Remove all dialyzer opt-outs and fix the defects they masked - #221

Merged
hlindset merged 2 commits into
elixir-image:mainfrom
hlindset:fix/remove-dialyzer-opt-outs
Jul 29, 2026
Merged

Remove all dialyzer opt-outs and fix the defects they masked#221
hlindset merged 2 commits into
elixir-image:mainfrom
hlindset:fix/remove-dialyzer-opt-outs

Conversation

@hlindset

@hlindset hlindset commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Removed all @dialyzer attributes and the .dialyzer_ignore_warnings file. 27 were stale, 5 (+ the ignore file) masked defects.

  • Image.drop_shadow/2 now validates before deriving :dy, and reports reason: :invalid_option. Only :opacity and :sigma are validated. :dx, :dy and unknown options are untouched here (out of scope), and will instead be fixed by a move to an Image.Options.DropShadow module in a follow-up
  • Image.Math.cos/1 and sin/1: added {:error, Image.error()} return type
  • Eight math operators gained Vimage.t() in its type (they all delegate to non-bang function that accept it)
  • Added success path tests for the image + pixel shapes of all 11 bang operators

Breaking changes (ish)

  • Image.drop_shadow/2 errors instead of raising on a non-numeric :sigma. ArithmeticError becomes {:error, %Image.Error{}}
  • Image.drop_shadow/2's :opacity and :sigma errors carry reason: :invalid_option. value now set to {:opacity, value} and {:sigma, value}

@hlindset
hlindset merged commit d84d26f into elixir-image:main Jul 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant