-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
time-equal
garbled message when time returned from function
#846
Labels
Comments
Hi @mdelah thanks for filling the issue. |
chavacava
added a commit
that referenced
this issue
Aug 12, 2023
chavacava
added a commit
that referenced
this issue
Aug 12, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: