When I run formatter,
assert of ExUnit is formatted without bracket.
assert 2 == 2
assert_changeset_error, but it is formatted with bracket
assert_changeset_error(:users, fn -> User.create(attrs) end)
It is possible to make my function formatted without bracket?
Sure, you will need to tell your formatter.exs file to allow this function without parens.
You likely have this file already, but it would look like this: