diff --git a/testdata/src/default-case-required/default-not-required/default_not_required.go b/testdata/src/default-case-required/default-not-required/default_not_required.go index f02dce8..63e22b4 100644 --- a/testdata/src/default-case-required/default-not-required/default_not_required.go +++ b/testdata/src/default-case-required/default-not-required/default_not_required.go @@ -46,14 +46,16 @@ func _e(t dcr.T) { } } - func _f() { +func _f() { // should not report because these are not enum switch // statements. + //exhaustive:enforce-default-case-required var x int switch x { case 0: } + //exhaustive:enforce-default-case-required switch { case x == 0: } diff --git a/testdata/src/default-case-required/default-required/default_required.go b/testdata/src/default-case-required/default-required/default_required.go index 33ce104..1368eaa 100644 --- a/testdata/src/default-case-required/default-required/default_required.go +++ b/testdata/src/default-case-required/default-required/default_required.go @@ -36,7 +36,7 @@ func _d(t dcr.T) { } } - func _e() { +func _e() { // should not report because these are not enum switch // statements. var x int