uber-go/nilaway
View on GitHubAdd support for rich effect functions via function pointers
Open
#277 opened on Sep 4, 2024
false positivegood first issue
Repository metrics
- Stars
- (3,862 stars)
- PR merge metrics
- (PR metrics pending)
Description
NilAway currently does not recognize function pointers as valid rich check effect functions, thereby reporting false positives.
type S struct {
f func() (*int, error)
}
func testme(s *S) {
v, err := s.f()
if err != nil {
return
}
_ = *v // FP: unassigned variable `v` dereferenced
}