You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a companion to [this PR](rust-lang/rust#76356), which deals with including functionality for automatically running `tidy --bless` on each commit.
Undo editor auto-formatting and clarify git hook renaming
a word
Phrasing
Apply suggestions from code review
Co-authored-by: Camelid <[email protected]>
that will automatically run `x.py test tidy --bless` on each commit, to ensure
12
+
your code is up to par. If you decide later that this behavior is
13
+
undesirable, you can delete the `pre-commit` file in `.git/hooks`.
14
+
15
+
A prebuilt git hook lives at [`src/etc/pre-commit.sh`](https://github.com/rust-lang/rust/blob/master/src/etc/pre-commit.sh) which can be copied into your `.git/hooks` folder as `pre-commit` (without the `.sh` extension!).
16
+
17
+
You can also install the hook as a step of running `x.py setup`!
18
+
6
19
## Configuring `rust-analyzer` for `rustc`
7
20
8
21
`rust-analyzer` can help you check and format your code whenever you save
@@ -82,7 +95,7 @@ directories you have [setup a worktree for]. You may need to use the pinned
82
95
nightly version from `src/stage0.txt`, but often the normal `nightly` channel
83
96
will work.
84
97
85
-
**Note** see [the section on vscode] for how to configure it with this real rustfmt `x.py` uses,
98
+
**Note** see [the section on vscode] for how to configure it with this real rustfmt `x.py` uses,
86
99
and [the section on rustup] for how to setup `rustup` toolchain for your bootstrapped compiler
87
100
88
101
**Note** This does _not_ allow you to build `rustc` with cargo directly. You
@@ -100,7 +113,7 @@ Sometimes just checking
100
113
whether the compiler builds is not enough. A common example is that
101
114
you need to add a `debug!` statement to inspect the value of some
102
115
state or better understand the problem. In that case, you really need
103
-
a full build. By leveraging incremental, though, you can often get
116
+
a full build. By leveraging incremental, though, you can often get
104
117
these builds to complete very fast (e.g., around 30 seconds). The only
105
118
catch is this requires a bit of fudging and may produce compilers that
106
119
don't work (but that is easily detected and fixed).
@@ -118,10 +131,10 @@ The sequence of commands you want is as follows:
0 commit comments