include::../description.adoc[]

== Noncompliant Code Example

----
void func(int n, int m) {

  switch (n) {
    case 1:
      // ...
    case 2:
      // ...
    case 3:
      switch (m) {  // Noncompliant
    case 4:  // Bad indentation makes this particularly hard to read properly
      // ...
    case 5:
      // ...
    case 6:
      // ...
    }
    case 4:
      // ...
    default:
      // ...
  }
}
----

== Compliant Solution

----
void func(int n, int m) {

  switch (n) {
    case 1:
      // ...
    case 2:
      // ...
    case 3:
      int m2 = handle_m(m);
    case 4:
      // ...
    default:
      // ...
  }
}
----

ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]
