Should I match the curly brace usage of the previous author?
- by Error 454
When working on code from multiple authors, I often encounter the issue of curly-brace preference (same line vs new line). Is it good/bad practice or even a non-issue when it comes to matching the existing style vs using your own preference?
Does the situation change if you are adding new code to a Class vs modifying existing code? Finally, if style should be matched, how far should the match propagate? i.e. the file, the class, subclasses etc.
Example:
if(this)
{
doThat();
}
Vs.
if(this){
doThat();
}