Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uptidy: exempt URLs from the line length restriction #39790
Conversation
rust-highfive
assigned
aturon
Feb 13, 2017
This comment has been minimized.
This comment has been minimized.
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
|
We don't really need lazy-static/regex for this, can we just ignore long lines with "http://" and "https://" ? |
This comment has been minimized.
This comment has been minimized.
|
Might need |
This comment has been minimized.
This comment has been minimized.
Well, that's essentially what I meant by a "hand-written parser", but I do think we should be a little more picky than just ... So anyway I wrote something, but it may not be the way someone 100% fluent in the language would write it, please tell me what you think. |
This comment has been minimized.
This comment has been minimized.
|
@bors: r+ Yeah this wasn't really written to be bulletproof, just catch some common mistakes. |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
@bors: retry |
zackw commentedFeb 13, 2017
The length of a URL is usually not under our control, and Markdown
provides no way to split a URL in the middle. Therefore, comment
lines consisting solely of a URL (possibly with a Markdown link
label in front) should be exempt from the line-length restriction.
Inline hyperlink destinations (
[foo](http://...)notation ) arenot exempt, because it is my arrogant opinion that long lines of
that type make the source text illegible.
The patch adds dependencies on the
regexandlazy_staticcratesto the tidy utility. This appears to Just Work, but if you would
rather not have that dependency I am willing to provide a hand-written
parser instead.