Skip to content

carlogilmar/elixir-coding-notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

PR Guidelines

Include

  • πŸ“ Business descripcion and diagrams
  • πŸ“ Especify what feedback are you waiting
  • πŸ“ Functions + Tests + Dialyzer + Credo
  • πŸ“ Code readability feedback will come from your teammates

Code guidelines

Function naming

  • πŸ“ Organize funcions in order by alphabet.
  • πŸ“ Add @doc detached an important piece of logic.
  • πŸ“ For functions to raise errors put ! in the function name.
  • πŸ“ Instead of use maybe use ensure.

Logic considerations

  • πŸ“ Repo operations should use with statement.
  • πŸ“ Instead of case, use pattern matching.
  • πŸ“ Resolve names in specs.
  • πŸ“ Always give a off-ramp to handle error values in functions.

Unit tests

  • πŸ“ Use present tense in test descriptions.
  • πŸ“ Unit test: Arrange, act and assert.
  • πŸ“ Don't assert before act in unit tests.

About

Just a bunch of notes about elixir coding style.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published