Home

Awesome

Credo's Elixir Style Guide Deps Status

Prelude

There are two reasons for this document to exist:

Like all of my work, this style guide stands on the shoulders of giants: It is influenced by the Ruby style guides by bbatsov and GitHub as well as more public attempts at Elixir Style Guides.

Philosophy

Contrary to other guides I've seen, this one is not very dogmatic. The overall principles are

This is especially important because we are such a young community. All the code we put out there is worth its weight in gold if it is easy to comprehend and invites people to learn and contribute.

Contribute

If you want to add to this document, please submit a pull request or open an issue to discuss specific points.

The Actual Guide

Code Readability

Naming

Sigils

Regular Expressions

Documentation

Refactoring Opportunities

Software Design

Pitfalls

Above all else

Follow your instincts. Write coherent code by applying a consistent style.

License

This work is licensed under the CC BY 4.0 license.