uber-go/nilaway

Implement special handling for `init`

Open

#56 opened on Sep 20, 2023

View on GitHub
 (0 comments) (1 reaction) (0 assignees)Go (92 forks)auto 404
enhancementgood first issue

Repository metrics

Stars
 (3,862 stars)
PR merge metrics
 (PR metrics pending)

Description

Implement special handling for init. Below is an example where a false positive is reported.

var _x *int

func init() {
	_x = new(int)
}

func test() {
	_ = *_x // false positive reported here
}

Contributor guide