Skip to content

Commit

Permalink
test case requires directive comment to be meaningful
Browse files Browse the repository at this point in the history
  • Loading branch information
nishanths committed Nov 13, 2023
1 parent 7e413c5 commit c6c8598
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c6c8598

Please sign in to comment.