sketch-hq / nicene

Additional Credo checks
MIT License
39 stars 7 forks source link

Credo rule to only allow importing Ecto.Query in X.Query #27

Open mz2 opened 3 years ago

mz2 commented 3 years ago

As per the DB query organisation rule set agreed, Ecto.Query should only be imported in X...X.Query modules.

uesteibar commented 3 years ago

I think we should have a rule like {Nicene.QueryModule, [exit_status: 0, name: Query]} so that the Query part is configurable. It can default to Query tho.

uesteibar commented 3 years ago

This way if we have a definition of a QueryModule, we can also enforce @doc for public functions in there