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
// In child process of testErrDisabledProcessExist.
ifos.Getenv(errDisabledTestEnv) !="1" {
return
}
Variables/consts beginning with the name err are usually errors.
It refers to testErrDisabledProcessExist which doesn't exist.
It's unclear from the comment which side of the branch is "in" something. Is it in the returning side, or the non-returning side? This might be a rare case where "early return" is a minor hinderance and perhaps it would be better to phrase it positively, and move the body of code out, to make it clear when the special condition matches:
This is indeed quite confusing, and bad. It's probably a relic from before a refactor. All of these self-exec tests need to be checked out more intimately anyway (#12), so I'll clean this up when I get to that. Thanks.
This is only a minor suggestion, but I found this confusing:
perf/record_test.go
Lines 219 to 225 in 239c48f
Variables/consts beginning with the name
err
are usually errors.It refers to testErrDisabledProcessExist which doesn't exist.
It's unclear from the comment which side of the branch is "in" something. Is it in the returning side, or the non-returning side? This might be a rare case where "early return" is a minor hinderance and perhaps it would be better to phrase it positively, and move the body of code out, to make it clear when the special condition matches:
The text was updated successfully, but these errors were encountered: