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 
whitespace wrapping issue (thats getting addressed :)) but still wanted the 
rest of the app formatted.

So I'm in favour.

Cheers
Jon

On Tue, 26 Apr 2022, at 6:33 PM, Ignacio Aguirrezabal wrote:
> Hello everyone,
> 
> Currently, the only way to exclude files from the formatter is to do 
> something like this:
> 
> [ 
>    inputs: 
>      Enum.flat_map( 
>        ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"], 
>        &Path.wildcard(&1, match_dot: true) 
>      ) -- Path.wildcard("test/example_app/**/*.*", match_dot: true) ]
> 
> 
> 
> So I think it would be nice to have a more convenient way to do it. Maybe 
> something like:
> [
>   inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
>   exclude: ["test/example_app/**/*.*"]
> ]
> 
> I have a working implementation in this branch but I didn't want to open a PR 
> before checking this is actually useful: 
> https://github.com/elixir-lang/elixir/compare/main...iaguirre88:formatter-exclude-dir?expand=1
> 
> Thanks,
> Ignacio
> 
> 
> 
> -- 
> 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/27d4a121-1f5f-4483-94e2-b43643dbe315n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/elixir-lang-core/27d4a121-1f5f-4483-94e2-b43643dbe315n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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/c1efa923-947d-4fea-abd8-2778c31cad10%40www.fastmail.com.

Reply via email to