mirego / dispatch

🦀 Dispatch makes sure pull requests within a GitHub organization get reviewed by the right people.
https://open.mirego.com
BSD 3-Clause "New" or "Revised" License
25 stars 3 forks source link

A first pass of code standardization #9

Closed gcauchon closed 5 years ago

gcauchon commented 5 years ago

The codebase greatly evolved in the last months, but this project also is a playground for member of our team learning Elixir! Even with pull reviews, things we done in many different ways… Now that we are open-sourcing the project, a little " spring cleaning " is mandatory!

  1. Upgrade to latest version of elixir and erlang.
  2. Update the credo configuration to match the version change.
  3. Replace Poison with Jason everywhere; both where used.
  4. Simplify alias with inline definition of module from the same namespace.
  5. Uniform way of invoking Application.get_env/3.
  6. Better logic flow using with.
  7. Replace function boxing (ie def fn/1defp fn/2) with function header with default values.

    fn(foo, bar \\ "default")
    
    fn(nil, _) do
    …
    end
    
    fn(foo, value) do
    …
    end
mirego-builds commented 5 years ago

🦀 Requesting reviewers for this pull request:

gcauchon commented 5 years ago

As soon as this PR is merged, I have a second one coming to apply the OTP/docker setup already available in the codebase to Heroku deployment!