bikebrigade / dispatch

Bike Brigade's dispatching software! 🚴
https://bikebrigade.ca
Apache License 2.0
72 stars 8 forks source link

Format Elixir source with `mix format`? #394

Closed danp closed 22 hours ago

danp commented 3 days ago

As a newcomer both to Elixir and this app, it would be very helpful to not have to worry too much about formatting.

I'm still getting my editor/etc setup going which should probably auto-format on save.

But it would be nice if mix format use was encouraged/enforced to ensure some baseline consistency.

For example running mix format mix.exs "lib/**/*.{ex,exs}" "test/**/*.{ex,exs}" as described in mix help format makes quite a few changes.

mveytsman commented 2 days ago

Good call. I have had mix format running on save before but have not consistently ran it as part of linting.

I ran it in #396.

Do you feel like we should add format as part of linting / a precommit hook?

danp commented 2 days ago

👍 I think enforcing it as part of CI would be great, along with tips in README/etc to suggest how to format locally before pushing.