Papillon6814

Papillon6814

Hi! I’m wondering if I should use formatter of elixir. I have never used any formatters in past projects.
So do you use formatter? And why do you use it?

Showing Posts 1 to 10

OvermindDL1

OvermindDL1

I still use the formatter even though I really really hate some of the things it does (like no trailing comma’s on multi-line things) just for consistency with what everyone else expects. I do the same with rust’s formatter and C++ formatting via clang and others as well. I may do some slight tweaks in configs (hard tabs instead of spaces because screw 3+width indentations when I’m in a terminal) when possible, but otherwise try to keep it as ‘vanilla’ as I can. It makes it easier for other people to look at and PR to your code.

dimitarvp

dimitarvp

For my Elixir, Rust, JavaScript, JSON and OCaml editing I use formatters even if I don’t like all of their decisions how things should look like.

Truth is, our code will be read by other people so I prefer to be a good citizen.

11
Post #2
dmitrykleymenov

dmitrykleymenov

For me it’s just a question of habit, more using formatter, more getting used to it and more loving things it does.

John-Goff

John-Goff

I love using the formatter, and specifically format on save in my editor, because it allows me to see if my code is right as it happens. If I save my file and everything snaps into place, I know I did things right. If it doesn’t, I know that I have a syntax error somewhere in the code I just wrote. Saves me from flicking back and forth to the server and my editor.

11
Post #4
dimitarvp

dimitarvp

Same, and I absolutely love it.

vinibrl

vinibrl

I use even though I don’t agree with every decision, but to maintain consistency. We also use mix format --check-formatted on CI to ensure the code is formatted.

a8t

a8t

yes. formatting is for computers to worry about, not me and certainly not a whole team. That’s the important part, the consistency.

ditto on using format-on-save to quickly let me know if I biffed it with a syntax blunder or something!

brightball

brightball

I do. I have it setup to run in VSCode on save and my team uses Committee to run it as a precommit hook.

APB9785

APB9785

Creator of ECSx

You all have inspired me to start using the format-on-save Atom plugin!

strzibny

strzibny

Yes, absolutely. We even fail CI build if the code is not formatted. My code is formatted in my editor on save.

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews