Skip to content

Detect string(int) casts #482

Closed
Closed
@vearutop

Description

@vearutop

If possible please add a linter to detect such code:

i := 123
a := string(i)

Such code produces surprising results and can led to subtle bugs with string value collisions for distinct int values.

Relevant issue: golang/go#3939

Metadata

Metadata

Assignees

No one assigned

    Labels

    linter: newSupport new linterstaleNo recent correspondence or work activity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions