gordonklaus / ineffassign

Detect ineffectual assignments in Go code.
MIT License
390 stars 22 forks source link

Only assume named returns can be read via a panic if there was a defer. #61

Open kyegupov opened 3 years ago

kyegupov commented 3 years ago

This tightens the analysis which has become too lenient after fixing #22. A possibility of panic can only lead to named returns being read if there is a "defer" statement which could call recover().