Skip to content

Commit 50ff7d0

Browse files
SONARJAVA-5955 Update rule S122's metadata (#5416)
1 parent 60b0be9 commit 50ff7d0

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
<h2>Why is this an issue?</h2>
22
<p>Putting multiple statements on a single line lowers the code readability and makes debugging the code more complex.</p>
33
<pre>
4-
if (someCondition) doSomething(); // Noncompliant
4+
if (someCondition) { doSomething(); } // Noncompliant
5+
6+
doSomething(); doSomethingElse(); // Noncompliant
57
</pre>
68
<p>Write one statement per line to improve readability.</p>
79
<pre>
810
if (someCondition) {
911
doSomething();
1012
}
13+
14+
doSomething();
15+
doSomethingElse();
1116
</pre>
1217

0 commit comments

Comments
 (0)