time-equal
garbled message when time returned from function
#846
Labels
time-equal
garbled message when time returned from function
#846
Describe the bug
The
time-equal
rule passes anast.Expr
to a%s
placeholder in its message format, but not allast.Expr
implementString()
, so junk is output for certain kinds of expressions (such as comparing atime.Time
that's returned from a function call).To Reproduce
Steps to reproduce the behavior:
go install github.com/mgechev/revive@latest
Source file
time-equal-test.go
:Expected behavior
Something more readable than:
The text was updated successfully, but these errors were encountered: