Left curly braces should be located at the beginning of lines of code

  • squid : LeftCurlyBraceStartLineCheck

Sharing some coding conventions is a key point to make it possible for a team to efficiently collaborate. This rule make it mandatory to place left curly braces at the beginning of lines of code.

The following code snippet illustrates this rule:

public void myMethod
{                                               // Compliant
  if(something)
  {                                             // Compliant
    executeTask();
  } else {                                      // Non-Compliant
    doSomethingElse();
  }
}
Close