Search code examples
javacode-formattinglegacy-code

Inherited code: To format or not to format?


Our team has recently inherited code which is extremely disorganized.

As a result, my team leader has decided to enforce a policy of auto-formating of code prior to saving a file. We have even found an option in Eclipse (The IDE of our choice) that auto-formats the code automatically before each save action.

Personally I am against it because I think that proper coding prevents messy code (most of the time) whereas auto-formating does not mean proper coding.

What are your opinions?


Solution

  • Auto-format the inherited code just once, and then proceed without auto-formatting.