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? At Hashrocket, we 💜 Elixir! From our many Elixir client projects, to sponsoring the Chicago Elixir Meetup, to the source code for this application, we are invested in this community. Contact us today to talk about your Elixir project.