pulibrary / dpul-collections

An inspiring environment for global communities to engage with diverse digital collections
1 stars 0 forks source link

Enforce standard format/style #35

Closed hackartisan closed 1 month ago

hackartisan commented 1 month ago

Acceptance Criteria

Implementation Details

We think mix format --check-formatted is relevant.

We can define an alias in the mix file to hide the flag.

First Step

Try out mix format.

Here's an example of defining an alias I think in the mix file https://elixirforum.com/t/do-you-use-formatter-in-your-elixir-project/39638/13

we should have some CI checks, too.

tpendragon commented 1 month ago

Seems like mix format --check-formatted is the thing?

I'm not sure if we want to try to use Dialyzer, I've heard it's quite hard to keep going.

hackartisan commented 1 month ago

okay dialyzer does type checking, here's an article: https://fly.io/phoenix-files/adding-dialyzer-without-the-pain/ makes sense to leave it out.

credo appears to be a style coaching tool? https://github.com/rrrene/credo maybe interesting for development but not CI.

what are the benefits of compiling as a matter of course in development before checking in code?

agree that mix format is the heart of the matter here.