Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

19
  • 107
    There's a logical error here. This method wouldn't encourage people to write well-formattted code; rather it would encourage people not to format and rely on the system instead! If your concern is that the code base is coherent, that's okay. It your goal is to train coders to write cleanly, it's a huge bug. Commented Apr 12, 2017 at 6:24
  • 53
    It's also with considering the effect this will have on features such as blame - espsecially if the formatter makes a lot of changes, if most lines in the file are marked as being changed by the formatter, you loose some of the value. Commented Apr 12, 2017 at 8:38
  • 14
    I've had issues with an autoformatter not being updated properly and breaking my code. Something to keep in mind. Commented Apr 12, 2017 at 9:01
  • 23
    If it is that important to you, you could fail the build when code in not formatted correctly. That is a bit harsh but a proper peer review would more or less do the same thing. Commented Apr 12, 2017 at 12:59
  • 18
    This is an excellent idea if your goal is to get people to hate you. It achieves very little, but will certainly cause unforeseen problems. Commented Apr 12, 2017 at 14:08