by sqeaky · 2y ago · 0 comments
Like we will suggest stuff if the obvious formatting is wrong in a way the author probably didn't intend, but we're not going to hold up a code review on a nit. If there's one variable that's Pascal case instead of camel case or something that's not going to stop the code from going in if it's good code from algorithmic and documentation perspective. We just vaguely try to be consistent in each file and act like adults.
We really agreed on value. We would insist that code that could be tested had tests. It was a C++ code base so we insisted that things be as fast as reasonable suggesting proper algorithms and data access patterns. And in general actually cared about bugs and making then shallow.
Another point of agreement was that an automatic code formatter almost always made it look worse than having a few nits here and there. Anyone who mandates the things that really don't matter is just getting in the way.
Worse still, you'll find you get messy diffs in constant ping-pong because different people have their formatters configured in different ways.
This is a solved problem, many editors, and tools, respect .editorconfig.
Learn to configure it, and never have to think about formatting again.
One thing I agree though, it's a waste of time to discuss about it. That problem is best solved with automatic tooling / linting. In the editor, git hooks and CI.
But if you and your colleagues don't have a problem with it, then I guess it's fine.