Find nested switch statements and expressions

Proprietary

Marks a switch statement or expression inside a case of another switch, which is hard to read and easy to break. A switch in a lambda, an anonymous class or a local class within the case is not marked, since it runs in another method, and neither is a switch in the selector of a nested switch. Extracting the inner switch into a method is left to the author. Test sources are not searched.

io.moderne.staticanalysis.FindNestedSwitch
mod run . --recipe=io.moderne.staticanalysis.FindNestedSwitch

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.