Skip to content

Commit eade19b

Browse files
authored
chore: export locals_without_parens in formatter (#161)
1 parent da0fd6c commit eade19b

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

.formatter.exs

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
# Used by "mix format"
2+
locals_without_parens = [
3+
# MongoDB
4+
after_load: :*,
5+
before_dump: :*,
6+
attribute: :*,
7+
collection: :*,
8+
embeds_one: :*,
9+
embeds_many: :*,
10+
# Test
11+
## Assertions
12+
assert_receive_event: :*,
13+
refute_receive_event: :*
14+
]
15+
216
[
317
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
418
line_length: 250,
5-
locals_without_parens: [
6-
# MongoDB
7-
after_load: :*,
8-
before_dump: :*,
9-
attribute: :*,
10-
collection: :*,
11-
embeds_many: :*,
12-
# Test
13-
## Assertions
14-
assert_receive_event: :*,
15-
refute_receive_event: :*
16-
]
19+
locals_without_parens: locals_without_parens,
20+
export: [locals_without_parens: locals_without_parens]
1721
]

test/collections/simple_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ defmodule Collections.SimpleTest do
6666
collection "cards" do
6767
attribute :title, String.t(), default: "new title"
6868
attribute :intro, String.t(), default: "new intro", name: "i"
69-
embeds_one(:label, Label, default: &Label.new/0, name: :l)
69+
embeds_one :label, Label, default: &Label.new/0, name: :l
7070
timestamps(inserted_at: {:created, :c_at}, updated_at: :modified, default: &Card.ts/0)
7171
end
7272

0 commit comments

Comments
 (0)