webuhu
Avoid the creation of .formatter.exs on new projects
As I find it very important to keep our “Elixir Project Structure” clean,
so I would suggest to start a discussion about,
if we should try to avoid creating .formatter.exs on new Elixir projects.
I personally use in my projects just the following within my mix.exs file:
defp aliases do
[
format_all: "format \"mix.exs\" \"{lib,test}/**/*.{ex,exs}\""
]
end
Post which brought me to think about the project structure topic: pragdave.me
Most Liked
Phillipp
That simply does not make sense for me.
We have two use cases here:
- Wants to use the formatter
- Does not want to use the formatter
If there is no .formatter.exs, all the people who would like to use it, have to google for the supposed content of the file.
If someone does not want to use it, they can simply ignore the file or delete it.
This requested change creates a bigger amount of work for the usecase of the majority of users. While your “edge-case” requires little to no effort to archive the goal on your project.
NobbZ
Personally, I prefer to keep this file, as it not only specifies which files to include in formatting, but also specifies which external or internal formatting rules I want to use to keep or omit parens.
Phillipp
Well, I guess quite a lot of people use the elixir formatter and would like to have a config for it. It’s way easier to delete the file if you don’t need it than to look up it’s supposed content if you want it.
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









