Skip to content

Inspection for variables assigned but not read before the next assignment #2732

@dlsniper

Description

@dlsniper
package main

func main() {
    demo := "first"
    demo = "second" // demo is assigned and not used before this assignment

    demo2 := "hello"
    demo2, demo3 := "third", 1 // demo2 is assigned and not used before this assignment

    _, _, _ = demo, demo2, demo3
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions