What about? Likely because of pos_integer()
instead of integer()
?
The call 'Elixir.Appsignal':set_gauge("database_size",pos_integer()) breaks the contract ('Elixir.String':t(),float() | integer()) -> 'ok'
I think I’m just going to add all of these to my .dialyzerignore file.
That’s what I did first.
But solving warnings taught me a lot.
But all this will teach me is how to create PRs to fix specs across every library I use
I think I’ll stick with dialyzer, though. Don’t think I can go back to hoping my types are ok.
1 Like
Not sure what editor you are using but if you are using VSCode or Atom the excellent https://github.com/JakeBecker/elixir-ls or https://github.com/JakeBecker/ide-elixir extensions will incrementally run dialyzer in the background for you as you work and show the list of warnings to fix.
1 Like
Awesome! I’m on Vim. I imagine there is a plugin, or could write a simple one. At the minute I’m just running dialyzer as part of my build process.
Yup - https://github.com/fishcakez/vim-dialyzer
2 Likes
jeffs
June 5, 2019, 10:22pm
26
@BitGonzo , ALE started supporting elixir_ls , which shows compile and dialyzer errors! You do have to save for it to compile/check though, but I really have found this helpful. You can also add credo and mix to get linting/formatting errors. If you add mix
as as a “fixer,” it will format on save too.
1 Like