Comment on Tabs are objectively better than spaces - gomakethings.com
shotgun_crab@lemmy.world 1 year ago
Code formatter
Comment on Tabs are objectively better than spaces - gomakethings.com
shotgun_crab@lemmy.world 1 year ago
Code formatter
_stranger_@lemmy.world 1 year ago
Holy wars are fun, but this is the answer.
At least this way the holy war takes place in commits to change the formatting file.
stevecrox@kbin.social 1 year ago
Parameter declarations, array initialisation and lambda alignment is the most common.
Java Lambda expressions can be hundreds of characters long so wrap on to the next line. A lot of code formatters will auto wrap with a single identation.
A lot of developers instead like to align each lambda call with the one above. They feel its more readable, personally I agree.
Normally in DevSecOps I offer a standard code format to a team, I highlight the contentious choices (like spaces or tabs) and ask the team if they have strong feelings about it and then sit back and let them decide.