[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. |
dswij
left a comment
There was a problem hiding this comment.
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 ifswas 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 ^^