Re: [elixir-core:10886] [Proposal] Exclude files from .formatter.exs

2022-04-27 Thread Andrea Leopardi
Fair enough. If you wanted to use a simpler string/regex match for the original use case, you might want to write something like this: [ inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"] |> Enum.flat_map((&1, match_dot: true) |> Enum.reject(&(&1 =~

Re: [elixir-core:10882] [Proposal] Exclude files from .formatter.exs

2022-04-27 Thread Andrea Leopardi
Hey Ignacio, thanks for the proposal. I don't feel too strongly about this, but I think it could be a useful addition. One note: I think :exclude should rather be exclude_pattern and be a regex. If an expanded filename matches the regex, it gets excluded. I think having a wildcard limits us

Re: [elixir-core:10884] [Proposal] Exclude files from .formatter.exs

2022-04-27 Thread Ignacio Aguirrezabal
Thanks, Andrea. I'll change it so it uses a regex instead. Cheers, Ignacio On Wednesday, April 27, 2022 at 10:03:50 AM UTC-3 an.le...@gmail.com wrote: > Hey Ignacio, thanks for the proposal. > > I don't feel too strongly about this, but I think it could be a useful > addition. > > One note: I

Re: [elixir-core:10884] [Proposal] Exclude files from .formatter.exs

2022-04-27 Thread José Valim
Thank you for the proposal, however I would prefer to not add this behaviour. It is definitely possible to do it today and at the same time we don't want to encourage excluding some files, unless absolutely necessary. And for the cases it is absolutely necessary, the current ways suffice. :) On

Re: [elixir-core:10881] [Proposal] Exclude files from .formatter.exs

2022-04-27 Thread Bruce Tate
+1 from me. Providing convenient ways to opt out will only increase formatter adoption. -bt On Tue, Apr 26, 2022 at 4:35 PM Jon Rowe wrote: > I wanted this feature recently as with the addition of the heex formatter > I wanted to format most of an app, but not one file temporarily due to a >

Re: [elixir-core:10886] [Proposal] Exclude files from .formatter.exs

2022-04-27 Thread Ignacio Aguirrezabal
Makes sense José <3 Thanks everyone for your input On Wednesday, April 27, 2022 at 10:10:40 AM UTC-3 José Valim wrote: > Thank you for the proposal, however I would prefer to not add this > behaviour. > > It is definitely possible to do it today and at the same time we don't > want to