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.

5
  • I've seen projects derailed for weeks because one of the developers thought this was a good idea. If you're going to do this, understand the risks beforehand, and decide exactly how far you're going to go with the formatting. I think mjfgates has the right answer. Commented Jan 18, 2016 at 20:41
  • 1
    Sounds like the team in question has bigger problems than code formatting. But yeah, I don't recommend doing this unless you thing you have to. If you want to do reformatting changes, I'd still say better do them as separate commits than intermixed with functional changes. Commented Jan 23, 2016 at 17:31
  • Yeah, lots of problems :P I just want to caution new developers that it's not a simple as it sounds. Bulk-reformatting tools are risky (especially if you build it yourself with regex - at least use AST), and if you care about code review and bug tracking, it can really mess with your process. Personally, I write my code to be consistent with the style of each file, though I don't mind reviewing code when a few functions are reformatted. Many developers get hung up on code style and neglect the bigger issues like architecture, process, tooling, etc. Commented Feb 5, 2016 at 6:42
  • In programming, nothing is as simple as it sounds :) Commented Feb 5, 2016 at 10:01
  • You might also choose a good point in time to do this, combined with automatic reformat on save in your IDE. Commented Dec 23, 2021 at 6:50