-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[read_line_without_trim
]: detect string literal comparison and .ends_with()
calls
#11136
Conversation
☔ The latest upstream changes (presumably #11095) made this pull request unmergeable. Please resolve the merge conflicts. |
r? @dswij |
ea4fc58
to
f94b066
Compare
wow, this PR is ancient :D (The first commit is the actual relevant addition, the second one moves some things around which causes the diff to look a bit annoying, so it's probably better reviewed commit-by-commit) |
☔ The latest upstream changes (presumably #12306) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! Sorry that the review take awhile.
Can you help to rebase this? I think it's good to merge afterward.
f94b066
to
fd85db3
Compare
@bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
This lint now also realizes that a comparison like
s == "foo"
and calls such ass.ends_with("foo")
will fail ifs
was initialized by a call toStdin::read_line
(because of the trailing newline).changelog: [
read_line_without_trim
]: detect string literal comparison and.ends_with()
callsr? @giraffate assigning you because you reviewed #10970 that added this lint, so this is kinda a followup PR ^^