Today I Learned

A Hashrocket project

Is your Elixir code formatted?

As part of an automated process, you might want to check to see if the Elixir code base is formatted correctly. Perhaps to fail a pull request on CI.

To check to see if the code is formatted correctly:

mix format --check-formatted

The command will output the offending files and return an error code.

I learned about this when CI for TIL failed for a PR 🙃.

Looking for help? Elixir is quickly gaining momentum for web applications that need concurrency, performance, and the ability to connect to many different clients. The developers at Hashrocket are learning along with the rest of the development community that Elixir and Phoenix are viable Rails alternatives for the right application. Check out the source code for Today I Learned, written in Elixir, and contact us if you need help with your Elixir project.