nlreturn
nlreturn copied to clipboard
block-size 100 still produces false positive
Trying to use this with golangci-lint
linter-settings:
nlreturn:
block-size: 100
Relevant section from my code, lines above and below this block are empty lines
if priority > 0 {
priorityDiffSeconds := time.Duration(timeBetweenBlocks * priority)
log.Infof("Priority greater than 0; Sleeping for %ds", priorityDiffSeconds)
select {
case <-ctx.Done():
log.Info("New block arrived; Canceling current bake")
return # this lis line 190
case <-time.After(priorityDiffSeconds * time.Second):
break
}
}
Result:
baking.go:190:4: return with no blank line before (nlreturn)
return
I would expect a block-size of 100 to ignore just about every situation but it is not.