finds.dev← search

// the find

christopheradams/elixir_style_guide

★ 4,427 · Elixir · updated May 2024

A community driven style guide for Elixir

A community-maintained style guide documenting conventions for Elixir code — naming, module structure, typespecs, comments, testing patterns. It's aimed at teams or solo devs who want a consistent baseline beyond what `mix format` already enforces, and it's often used as the reference Credo's own style checks are modeled after.

Every rule has a concrete before/after code example rather than abstract prose, so it's actually usable as a lookup reference during review. It explicitly separates what the Code Formatter already handles from manual conventions (module attribute ordering, naming, struct field defaults, exception naming) instead of duplicating formatter behavior. It's been through years of community PRs with translations into 9 languages, which is a decent signal the conventions have been argued over and settled rather than one person's opinion.

It's just markdown — there's no linter or Credo config shipped alongside it, so nothing actually enforces these rules on your codebase; you have to wire up Credo yourself and hope its checks match. Some guidance (e.g. `unless`/`else`, single-arity pipe parens) reads as dated relative to how idiomatic Elixir is written today, and there's no version pinning to specific Elixir releases so newer language features (structs with `@enforce_keys`, newer typespec patterns) aren't covered. As a docs-only repo there are no tests or CI validating examples still compile, so a stale example could sit uncaught for a long time.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →