mirror of
https://github.com/mgechev/revive.git
synced 2025-01-10 03:17:11 +02:00
44eed7edb7
* fix error return rule to allow multiple error return values please check golint related updates here: golang/lint@8379672 When returning multiple values with an error, lint checks if the error is the last return value. But the implementation actually is checking for all return values except for the last one, and throw the alert if it found an error. There is a (edge) case where some function returning more than one error is getting a false positive even when the last return value is an error. This patch adds an early check, to see if the last return value is an error and if so, it will pass silently. * Fix return error * add test changes |
||
---|---|---|
.. | ||
blank-import-lib.go | ||
const-block.go | ||
context-as-argument.go | ||
context-keys-type.go | ||
docs_test.go | ||
error-naming.go | ||
error-return.go | ||
error-strings.go | ||
errorf.go | ||
exported.go | ||
if-return.go | ||
import-dot.go | ||
increment-decrement.go | ||
indent-error-flow.go | ||
package-doc1.go | ||
package-doc2.go | ||
package-doc3.go | ||
package-doc4.go | ||
package-doc5.go | ||
package-main.go | ||
range.go | ||
receiver-naming.go | ||
sort.go | ||
stutter.go | ||
time-naming.go | ||
unexported-return.go | ||
value-spec.go | ||
var-declaration.go | ||
var-naming.go |