diff --git a/.formatter.exs b/.formatter.exs index f5be5d0..bce5654 100644 --- a/.formatter.exs +++ b/.formatter.exs @@ -2,7 +2,9 @@ inputs: [ "lib/**/*.{ex,exs}", "test/**/*.{ex,exs}", + "priv/**/*.{ex,exs}", "mix.exs" ], - line_length: 120 + line_length: 120, + import_deps: [:ecto] ] diff --git a/test/support/comment.ex b/test/support/comment.ex index 285fb49..a2e5c2f 100644 --- a/test/support/comment.ex +++ b/test/support/comment.ex @@ -2,10 +2,10 @@ defmodule ExSieve.Comment do use Ecto.Schema schema "comments" do - belongs_to(:post, ExSieve.Post) - belongs_to(:user, ExSieve.User) + belongs_to :post, ExSieve.Post + belongs_to :user, ExSieve.User - field(:body) + field :body timestamps() end diff --git a/test/support/post.ex b/test/support/post.ex index d3e3af3..41dd003 100644 --- a/test/support/post.ex +++ b/test/support/post.ex @@ -2,13 +2,13 @@ defmodule ExSieve.Post do use Ecto.Schema schema "posts" do - has_many(:comments, ExSieve.Comment) - belongs_to(:user, ExSieve.User) + has_many :comments, ExSieve.Comment + belongs_to :user, ExSieve.User - field(:title) - field(:body) - field(:published, :boolean) - field(:published_at, :naive_datetime) + field :title + field :body + field :published, :boolean + field :published_at, :naive_datetime timestamps() end diff --git a/test/support/user.ex b/test/support/user.ex index bd89981..e754c5f 100644 --- a/test/support/user.ex +++ b/test/support/user.ex @@ -2,11 +2,11 @@ defmodule ExSieve.User do use Ecto.Schema schema "users" do - has_many(:comments, ExSieve.Comment) - has_many(:posts, ExSieve.Post) + has_many :comments, ExSieve.Comment + has_many :posts, ExSieve.Post - field(:name) - field(:cash, Money.Ecto.Type) + field :name + field :cash, Money.Ecto.Type timestamps() end