* coding/coding-style.html: Added switch/case indentation rules
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@18881
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-01-15 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Maciej
+
+ * coding/coding-style.html: Added switch/case indentation rules
+
2007-01-15 Eric Seidel <eric@webkit.org>
Reviewed by bdash.
} // namespace WebCore
</pre>
</li>
+<li>A case label should line up with its switch statement. The case statement is indented.
+<h4 class="right">Right:</h4>
+<pre class="code">
+switch (condition) {
+case fooCondition:
+case barCondition:
+ i++;
+ break;
+default:
+ i--;
+}
+</pre>
+
+<h4 class="wrong">Wrong:</h4>
+<pre class="code">
+switch (condition) {
+ case fooCondition:
+ case barCondition:
+ i++;
+ break;
+ default:
+ i--;
+}
+</pre>
+</li>
</ol>
<h3>Spacing</h3>