org.sonar.l10n.java.rules.squid.LeftCurlyBraceStartLineCheck.html Maven / Gradle / Ivy
Shared coding conventions make it possible to collaborate efficiently. This rule make 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();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy