hauleth
Mix unused - simple task for looking for unused public functions
After request in this thread I created simple task for looking for unused public functions (mix xref unreachable returns information only about unused private functions).
Code: GitHub - hauleth/mix_unused: Find unused functions in your project · GitHub
Currently it isn’t released on Hex as I am still polishing the edges. Feel free to test this out.
Most Liked
hauleth
So I have finally find some time to make it work for Elixir 1.10 and publish it on Hex.
Now it is implemented via compiler tracing, so it is only Elixir 1.10 and later, but thanks to that, it also works with ElixirLS.
Beware that it is still WIP, and there are some features missing, and it will print a lot (and by a lot I mean A LOT) of false positives as it do not filter out generated functions nor Elixir macros. So prepare for filtering out quite a lot.
Testers, suggestions, and pull requests are welcome.
What is not currently working:
- Macros filtering
- Generated functions filtering (so for example you need to filter out
{:_, :__schema__, :_}if you use Ecto, all controller actions if you use Phoenix, etc.) - Lines for given functions, so all missing functions will be reported on top of the file
- No way to filter out functions using regular expression
- No way to filter out functions using range arity
hauleth
v0.4.1 released
The main reason for that is that older version was reporting false positives (used function reported as unused) if there was a call cycle.
Bug Fixes
- resolve issue with unused analyzer reporting false positives (
3b86630)
Documentation
- Improve Usage Docs a bit around usage (
a191c46)
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









