3 ms·
> Agreed. Especially on a formatter. The number of code review comments it cuts out is incredibly time and energy saving. Are people realistically reviewing co
by xormapmap 3y ago
> Agreed. Especially on a formatter. The number of code review comments it cuts out is incredibly time and energy saving.
Are people realistically reviewing code formatting? As long as people aren't making egregious violations I generally don't care if someone leaves a brace on the same line or writes a one-line if statement. I tend to review the overall design and look for bugs and edge cases that might've been missed. If somebody told me they didn't like the way I formatted the code then they've got their own editor and are welcome to change it if they want to be petty.
- throwawaymaths 3y agoNobody is reviewing it. They are rejecting malformatted code in CI step.
- nickcox 3y agoThat's not the workflow your GP is describing.
- xxpor 3y agoAbsolutely. Inconsistency is sloppy, increases cognitive burden while reading code, and can hide bugs. Everyone should take the time to setup their editor to format their code consistent with the project style, it doesn't take long at all.
- hyperhopper 3y agoYou're looking at it the wrong way People review code. As soon as that happens, formatting is part of the conversation. Either consciously or subconsciously
- patmorgan23 3y agoThe point of the auto formatter is to get those slight differences out of the way so your Brian can focus on parsing and understanding the important parts
- brundolf 3y agoIn addition to reviews, I've started to really enjoy format-on-save as a way to save keystrokes. Instead of manually formatting my code (even for myself), I can take the shortest editor path to the AST that I want and then have everything else snap into place