8000 staticcheck: SA4006: don't flag variable used in switch statement · Issue #533 · dominikh/go-tools · GitHub
[go: up one dir, main page]

Skip to content

staticcheck: SA4006: don't flag variable used in switch statement  #533

Closed

Description

@dominikh

The following code

key := in.UnsafeString()
switch key {
default:
	in.SkipRecursive()
}

complains about key being unused, because the generated SSA simplifies the switch away. This is a noisy positive, and code that is common to certain code generators.

Activity

  1. added a commit that references this issue on Jul 25, 2019
    27d9952
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0