`mix format` is always strict—even in cases where some of us would want
"protected sections" (e.g., a formatted table of numbers). It doesn’t
*revert* legal parentheses.

That is, `field(:name, :string)` is always legal even if
`locals_without_parens` is set for `field/2`.

-a

On Fri, Feb 24, 2023 at 5:15 PM AaronT <aa...@geekshow.com> wrote:

> When running `mix format` it seems to bypass cases where the code is
> syntactically correct but `locals_without_parens` are set or inherited
> from deps.
>
> So you items like `field(:name, :string)` is considered correct even if
> `,formatter.exs` has `import_deps: [:ecto]` which should cause it to format
> as `field :name, :string`.  This has led to inconsistencies in a sizable
> codebase which I'd like to have avoided.
>
> I'd like to suggest a strict mode which is triggered with a  `--strict`
> argument which will strictly enforce the formatting guidelines.  This can
> then be used locally or in a ci process to ensure that the format is
> actually enforced.
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elixir-lang-core+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-core/287adcfa-bdb7-4696-927e-76983d97f7e6n%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/287adcfa-bdb7-4696-927e-76983d97f7e6n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Austin Ziegler • halosta...@gmail.com • aus...@halostatue.ca
http://www.halostatue.ca/http://twitter.com/halostatue

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAJ4ekQs_112E_fB5YNW4F4GimBZq4infbng1R9oMM49JxQ4ZyA%40mail.gmail.com.

Reply via email to