Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

add tool to "enforce" semantic line breaks #1485

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

Draft
tshepang wants to merge 1,872 commits into rust-lang:master
base: master
Choose a base branch
Loading
from tshepang:semantic-line-breaks

Conversation

Copy link
Member

@tshepang tshepang commented Oct 18, 2022
edited
Loading

See #1132

Run it so:

cd ci/semantic-line-breaks
cargo run --- ../../src [--overwrite]

Diff is large, so maybe should be automated.

lqd and others added 30 commits October 22, 2021 01:00
This commit adds initial documentation for LLVM Control Flow Integrity
(CFI) support to the Rust compiler (see rust-lang/rust#89652 and
rust-lang/rust#89653).
Co-authored-by: Yuki Okushi <jtitor@2k36.org>
Co-authored-by: nhamovitz <18648574+nhamovitz@users.noreply.github.com>
Use paragraphs instead of bullet-points.
Edits throughout for clarity.
Use semantic line breaks in edited sections.
Co-authored-by: Joshua Nelson <github@jyn.dev>
I removed one of them because it doesn't seem necessary.
Co-authored-by: Yuki Okushi <jtitor@2k36.org>
The italics added in rust-lang#1239 broke the implicitly-resolved link.
* Fix broken links in region_inference.md
* Fix broken links in lifetime_parameters.md
Co-authored-by: pierwill <19642016+pierwill@users.noreply.github.com>
JhonnyBillM and others added 16 commits September 22, 2022 10:29
The proc-macro server path is required for proc-macros to properly work in r-a when working on rustc.
Pointing the sysroot to the stage0 one is more correct than using the system installed one.
Previously, "Building and debugging `rustc`" linked to the getting started page, which isn't correct. If people want that page, it already appears in the sidebar, and is the next sequential page.
When doing a git grep (of rustc-dev-guide or of rust-lang/rust with
--recurse-submodules), if the grep happens to match within the minified
javascript, the resulting long single lines can cause a text pager or
editor to slow down and distract from more useful matches.
Minified javascript isn't formatted for human consumption, by
definition, so mark it as binary, which causes git grep to instead just
state that it matches without printing the matching "line".
Using `llvm.godbolt.org` subdomain should automatically select the correct LLVM-IR language.
Copy link
Member

I don't have an objection to enforcing sembr but the implementation does look fragile, e.g. there's no tokenizer. Have you considered using an existing tool like https://github.com/bobheadxi/readable?

Copy link
Member Author

I have not... thanks for the suggestion, will have a look.

JohnTitor reacted with thumbs up emoji

@JohnTitor JohnTitor added the S-waiting-on-author Status: this PR is waiting for additional action by the OP label Oct 22, 2022
Copy link

m-spitfire commented Jan 23, 2023
edited
Loading

I have tried using readable to have a GitHub action that runs check, and format all the existing code, but the tool is immature, it gave errors for some files saying Cannot take length of multi-line node '[object Object]' (bobheadxi/readable#18) and for others the aforementioned issue is there, it does the wrong thing when it encounters e.g.(bobheadxi/readable#17). I am not sure what should be done here, make readable better or create another tool?

Copy link
Member Author

This tool of mine handles both issues without choking. I intend to get back to making it more fancy... I keep postponing.

Copy link
Member

Kobzol commented Jan 5, 2025

Sorry, due to me messing up a git operation, we sadly had to force-push the whole commit history of rustc-dev-guide :( If you'd like to update this pull request, you will have to rebase it in a special way onto the new commit history (the new master):

git fetch origin --all
git checkout <pr-branch>
git rebase --onto origin/master origin/master-old
git push --force-with-lease

More context can be found here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /