I just ran this on some old code and it told me a function was too complex (it is!) and could use refactoring, that's some smart linting :-)
The rich support for quoting / unquoting code in Elixir makes it possible to easily compute metrics like this. The implementation in Credo essentially walks through the code, keeping track of how many "branch" operations are encountered.
https://github.com/rrrene/credo/blob/master/lib/credo/check/...