3 Libraries for Your New Elixir Project
If you had to name the libraries you rarely start an Elixir project without, what would those be? Personally, the top of my list is reserved for security scanners and code analyzers that gently but firmly push me to write better code. Without further ado, here’s three of them.
Credo
Have Credo analyze your code for style issues by typing:
$ mix credo
To create a per-project .credo.exs
config file, type:
$ mix credo gen.config
Hint: For your open-source projects, you may also want to check out Codebeat. (At the time of writing, CodeClimate doesn’t seem to support Elixir.)
Sobelow
If you build web apps with Phoenix, Sobelow is a vulnerability scanner you don’t want to miss. Run by typing:
$ mix sobelow
Hint: I use VersionEye for spotting out-of-date Mix dependencies, but apparently they scan Git repos for vulnerabilities, too.
InchEx
InchEx evaluates your project’s docs and gives you hints where to improve. Simply type:
$ mix inch
Do check out Inch CI web service, too.
Hint: If characters in the output seem broken and you have Ruby installed, running “gem install inch” fixed the issue for me.