Consider using Dialyzer
From https://erlang.org/doc/man/dialyzer.html
Dialyzer is a static analysis tool that identifies software discrepancies, such as definite type errors, code that has become dead or unreachable because of programming error, and unnecessary tests, in single Erlang modules or entire (sets of) applications.
There is a mix task for using it in Elixir https://github.com/jeremyjh/dialyxir
This seems useful and I've seen quite a lot of Elixir projects using it, but I have not worked with it personally so would be interested to hear if it's actually necessary.