package testpkg

import "fmt"

func validCases() {
START:
	fmt.Println("start")

	switch 1 {
	case 1:
		for range []int{} {
			if true {
				fmt.Println("")

				continue
			}

			if true {
				fmt.Println("")
				break
			}

			if true {
				fmt.Println("")
				continue
			}

			if true {
				fmt.Println("")
				goto START
			}

			if false {
				fmt.Println("")
				fmt.Println("")
				fmt.Println("")

				break
			}

			if false {
				fmt.Println("")
				fmt.Println("")
				fmt.Println("")

				continue
			}

			if false {
				fmt.Println("")
				fmt.Println("")
				fmt.Println("")

				goto START
			}
		}

		fallthrough
	case 2:
	}
}

func invalidCases() {
START:
	fmt.Println("start")

	switch 1 {
	case 1:
		for range []int{} {
			if true {
				fmt.Println("")
				fmt.Println("")
				fmt.Println("")
				break // want `missing whitespace above this line \(too many lines above branch\)`
			}

			if true {
				fmt.Println("")
				fmt.Println("")
				fmt.Println("")
				continue // want `missing whitespace above this line \(too many lines above branch\)`
			}

			if true {
				fmt.Println("")
				fmt.Println("")
				fmt.Println("")
				goto START // want `missing whitespace above this line \(too many lines above branch\)`
			}
		}

		fmt.Println("")
		fmt.Println("")
		fmt.Println("")
		fallthrough // want `missing whitespace above this line \(too many lines above branch\)`
	case 2:
	}
}
