Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Follow original author's coding style? Even if it is horrible / lazy / makes your eyes bleed? [closed]

Tags:

c

open-source

When contributing to a very old, and apparently no longer maintained, open-source or public domain project, is it suggested practice to follow the original author's coding style even if it is terrible?

More importantly, are there any reasons why one would want to follow the original author's coding style rather than clean it up significantly?

like image 528
oevna Avatar asked Jun 03 '09 20:06

oevna


1 Answers

Follow the original coding style. It is far, far better to be consistent, even if it's not pretty to you.

If you do decide to clean up the coding style, do it separately from any other changes. Don't clutter up source control diff's with style changes. Make one (or several) checkins where the only thing you're doing is changing code style. Do not mix in real changes with meaningless changes, it makes it impossible to locate relevant changes when reviewing source control commits.

like image 141
Adam Rosenfield Avatar answered Sep 19 '22 07:09

Adam Rosenfield