.gitignore added
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / honnef.co / go / tools@v0.1.1 / staticcheck / testdata / src / CheckEmptyBranch / CheckEmptyBranch.go
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.1.1/staticcheck/testdata/src/CheckEmptyBranch/CheckEmptyBranch.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.1.1/staticcheck/testdata/src/CheckEmptyBranch/CheckEmptyBranch.go
new file mode 100644 (file)
index 0000000..60595ec
--- /dev/null
@@ -0,0 +1,30 @@
+package pkg
+
+func fn1() {
+       if true { // want `empty branch`
+       }
+       if true { // want `empty branch`
+       } else { // want `empty branch`
+       }
+       if true {
+               println()
+       }
+
+       if true {
+               println()
+       } else { // want `empty branch`
+       }
+
+       if true { // want `empty branch`
+               // TODO handle error
+       }
+
+       if true {
+       } else {
+               println()
+       }
+
+       if true {
+       } else if false { // want `empty branch`
+       }
+}