Do not beautify code

Peter wisely wrote to the developer list:

A note of caution regarding auto format tools. We had this problem in the past, where some developers would routinely reformat the source files they were looking at (or fixing minor issues in) and checking in these changes. This complicated life for other people who were working on the code, since it was hard to trace what has been changed. This also made for some unnecessary ugly merges. In many cases bad formatting was localized to one or two lines, yet running formatting/beautifying tools would result in changes on almost every line.
So my recommendations are:

  • fix formatting problems, instead of "beautifying" the code
  • limit the use of auto formatters to local regions of the file (this can be usually done by selecting the region first)
  • don't commit reformatting changes together with functional changes, comment in CVS that this was a formatting change, so that others don't have to spend time analyzing what might have changed.