You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can see that this is a duplicate of #386, whose fix was later reverted by #416. Do those reasons still stand? That was in 2020, and some things might have changed since (for instance, Go modules are now the norm).
I can see that many other revive checks use type information. Why can't this one?
Describe the bug
An empty
for ... range
loop on a channel gets flagged byempty-block
.Unlike empty
for ... range
loops on slices and maps, one on a channel has an effect even when the body is empty: it drains the channel.To Reproduce
revive@latest
, no configuration file, all defaults, reports this code:Expected behavior
empty-block
is not triggered.Logs
Desktop:
go version go1.20.6 linux/amd64
The text was updated successfully, but these errors were encountered: