christopheradams / elixir_style_guide

A community driven style guide for Elixir
4.37k stars 299 forks source link

Adds @callback, @macrocallback and @optional_callbacks guides #140

Closed rhruiz closed 7 years ago

rhruiz commented 7 years ago

Adds guides for formatting and module ordering for defining behaviours using @callback, @macrocallback and @optional_callbacks

Closes #139

christopheradams commented 7 years ago

Looking pretty good! I had a question on one line. Please check out the review.

Does anyone have other feedback or comments on how to write a @callback?

I've come across (and used) an alternative style where each optional callback gets its own @optional_callbacks line rather than listing them all at once at the end, but it may be too much to mention it here.

christopheradams commented 7 years ago

Thanks! We can leave the callbacks section in this PR and perhaps revisit it at another time.