Hello, by default build-in assert functions doesn't require parenthesis when using then, so basically you can write this:
assert :bla == :bla
instead of
assert(:bla == :bla)
Since your library adds new assert functions, I think it would be nice that they don't require parenthesis too (note that when I say don't require, I mean that the formatter doesn't add them automatically).
To do that, you just need to add a .formatter.exs file to the library specifying the functions that doesn't need parenthesis, for example:
Hello, by default build-in assert functions doesn't require parenthesis when using then, so basically you can write this:
instead of
Since your library adds new assert functions, I think it would be nice that they don't require parenthesis too (note that when I say don't require, I mean that the formatter doesn't add them automatically).
To do that, you just need to add a
.formatter.exs
file to the library specifying the functions that doesn't need parenthesis, for example:Basically you only need to add the other assert functions to
locals_without_parens
variable.With that in place, a user of your library just need to add
assertions
to itsimport_deps
property of their project.formatter.exs
file: