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
such that the lint is disabled for top-level return statements (and not including nested closures) in closures if the closure is directly passed as the fn parameter for a function matching TryForEach.
The text was updated successfully, but these errors were encountered:
Hmm, that is an interesting use case. Quite specific, it seems.
I'm not opposed to it, but I'm currently thinking of the value versus adding a line level ignore. Is this something that happens enough to you that it's worth the implementation effort for you?
Well, I use the TryForEach function a lot in the implementation of a certain interface in my project, so I have to add //nolint:wrapcheck above the whole function for every implementation of this interface. I agree this is a bit niche; would be great if anyone could propose a more reusable ignore rule.
I have a utility function like this:
However, when I call this function:
I get an error for not wrapping
DoSomething
.TryForEach
actually already wraps the error. It would be useful to have an ignore directive like this:such that the lint is disabled for top-level return statements (and not including nested closures) in closures if the closure is directly passed as the
fn
parameter for a function matchingTryForEach
.The text was updated successfully, but these errors were encountered: