-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New lint [four_forward_slashes]
#11140
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
Conversation
|
r? @xFrednet (rustbot has picked a reviewer for you, use r? to override) |
|
r$ @blyxyas (xFrednet has picked a reviewer for you, use r$ to override) |
blyxyas
left a comment
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.
I cannot stop thinking about rustc_ast::util::comments::gather_comments, it returns a Vec<Comment> and that could be used to check if the comment starts with // or //// (I'm not sure Comment also includes the initial //).
It would be simpler, but we'd have to do a benchmark to verify speed. Maybe SPEEDTEST can help with that?
|
Perhaps we can use the lexer though. I hadn't thought to and that may be nicer |
|
Unfortunately |
Make it trim the contents
30d8cf9 to
1bca699
Compare
1bca699 to
2e43d0c
Compare
blyxyas
left a comment
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.
LGTM, Thanks! ❤️
cc @xFrednet
|
I'm sadly busy until Tuesday/Wednesday, but then I'll do the last check. :) |
|
I have full trust in your review: @bors r=blyxyas |
|
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Closes #9212
changelog: New lint [
four_forward_slashes]