Skip to content

exported_loop_pointer for go >= 1.22 #3712

@loodde

Description

@loodde

Describe the bug
https://semgrep.dev/r?q=exported_loop_pointer

With the loop pointer issue fixed in go 1.22 (https://go.dev/blog/loopvar-preview) this rule creates a false positive. Would it make sense/be possible to have the rule conditionally applied based on the go version?

Expected behavior
When using go >= 1.22 I would expect the rule to not trigger.

Priority
How important is this to you?

  • P0: blocking me from making progress
  • P1: this will block me in the near future
  • P2: annoying but not blocking me

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions