Our team recently inherited code that is extremely disorganized.
As a result, my team leader decided to apply an automatic code formatting policy before saving the file. We even found an option in Eclipse (the IDE of our choice) that automatically formats the code before each save action.
Personally, I am opposed, because I believe that correct encoding prevents dirty code (most of the time), while automatic formatting does not mean correct encoding.
What are your opinions?
, .
. , "" , .
. . SCM: , , , - !
. :
if (aCondition) foo(); bar();
:
if (condition) foo(); bar();
, if.
if
, , ( Java) !
, . , , , , , .
, . - - - , , .
.
"" - , .
, :
, - , , . , . , .
Eclipse .
, "". , - ? , , .
" " " ". , , , , , . ( , , , .)
- - - , . , . Suck , .
, , . , , . Formatters , , ..
, checkstyle , , . - , eclipse , , .
eclipse, , , . eclipse, , . . CheckStyle .
, , .
, . , , , , , , !
, , , . , " ".
, " ", , "". , , , - , . , , , , .
, . , , , .
P.S. , .
, Eclipse, , ( , ?), , .
. , .
, , , , , , , . , , , -, , . , ( , ), , .
, , , , , , , , .