Shared coding conventions make it possible to collaborate efficiently. This rule makes it mandatory to place the open curly brace at the beginning
of a line.
Noncompliant code example
public void myMethod { // Noncompliant
if(something) { // Noncompliant
executeTask();
} else { // Noncompliant
doSomethingElse();
}
}
Compliant solution
public void myMethod
{
if(something)
{
executeTask();
} else
{
doSomethingElse();
}
}