Skip to content

Commit b37d24f

Browse files
committed
Move parts of CONTRIBUTING.md to the book
1 parent cbe4de2 commit b37d24f

File tree

2 files changed

+55
-23
lines changed

2 files changed

+55
-23
lines changed

CONTRIBUTING.md

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ anything, feel free to ask questions on issues or visit the `#clippy` on [Zulip]
1313
All contributors are expected to follow the [Rust Code of Conduct].
1414

1515
- [Contributing to Clippy](#contributing-to-clippy)
16-
- [Getting started](#getting-started)
17-
- [High level approach](#high-level-approach)
18-
- [Finding something to fix/improve](#finding-something-to-fiximprove)
16+
- [The Clippy book](#the-clippy-book)
17+
- [High level approach](#high-level-approach)
18+
- [Finding something to fix/improve](#finding-something-to-fiximprove)
1919
- [Writing code](#writing-code)
2020
- [Getting code-completion for rustc internals to work](#getting-code-completion-for-rustc-internals-to-work)
2121
- [IntelliJ Rust](#intellij-rust)
@@ -28,20 +28,24 @@ All contributors are expected to follow the [Rust Code of Conduct].
2828
[Zulip]: https://rust-lang.zulipchat.com/#narrow/stream/clippy
2929
[Rust Code of Conduct]: https://www.rust-lang.org/policies/code-of-conduct
3030

31-
## Getting started
31+
## The Clippy book
3232

33-
**Note: If this is your first time contributing to Clippy, you should
34-
first read the [Basics docs](doc/basics.md).**
33+
If you're new to Clippy and don't know where to start the [Clippy book] includes
34+
a developer guide and is a good place to start your journey.
3535

36-
### High level approach
36+
<!-- FIXME: Link to the deployed book, once it is deployed through CI -->
37+
[Clippy book]: book/src
38+
39+
## High level approach
3740

3841
1. Find something to fix/improve
3942
2. Change code (likely some file in `clippy_lints/src/`)
40-
3. Follow the instructions in the [Basics docs](doc/basics.md) to get set up
43+
3. Follow the instructions in the [Basics docs](book/src/development/basics.md)
44+
to get set up
4145
4. Run `cargo test` in the root directory and wiggle code until it passes
4246
5. Open a PR (also can be done after 2. if you run into problems)
4347

44-
### Finding something to fix/improve
48+
## Finding something to fix/improve
4549

4650
All issues on Clippy are mentored, if you want help simply ask @Manishearth, @flip1995, @phansch
4751
or @llogiq directly by mentioning them in the issue or over on [Zulip]. This list may be out of date.
@@ -86,20 +90,6 @@ an AST expression). `match_def_path()` in Clippy's `utils` module can also be us
8690
[let chains]: https://github.com/rust-lang/rust/pull/94927
8791
[nest-less]: https://github.com/rust-lang/rust-clippy/blob/5e4f0922911536f80d9591180fa604229ac13939/clippy_lints/src/bit_mask.rs#L133-L159
8892

89-
## Writing code
90-
91-
Have a look at the [docs for writing lints][adding_lints] for more details.
92-
93-
If you want to add a new lint or change existing ones apart from bugfixing, it's
94-
also a good idea to give the [stability guarantees][rfc_stability] and
95-
[lint categories][rfc_lint_cats] sections of the [Clippy 1.0 RFC][clippy_rfc] a
96-
quick read.
97-
98-
[adding_lints]: https://github.com/rust-lang/rust-clippy/blob/master/doc/adding_lints.md
99-
[clippy_rfc]: https://github.com/rust-lang/rfcs/blob/master/text/2476-clippy-uno.md
100-
[rfc_stability]: https://github.com/rust-lang/rfcs/blob/master/text/2476-clippy-uno.md#stability-guarantees
101-
[rfc_lint_cats]: https://github.com/rust-lang/rfcs/blob/master/text/2476-clippy-uno.md#lint-audit-and-categories
102-
10393
## Getting code-completion for rustc internals to work
10494

10595
### IntelliJ Rust

book/src/development/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,43 @@
11
# Clippy Development
2+
3+
Hello fellow Rustacean! If you made it here, you're probably interested in
4+
making Clippy better by contributing to it. In that case, welcome to the
5+
project!
6+
7+
> _Note:_ If you're just interested in using Clippy, there's nothing to see from
8+
> this point onward and you should return to one of the earlier chapters.
9+
10+
## Getting started
11+
12+
If this is your first time contributing to Clippy, you should first read the
13+
[Basics docs](basics.md). This will explain the basics on how to get the source
14+
code and how to compile and test the code.
15+
16+
## Writing code
17+
18+
If you have done the basic setup, it's time to start hacking.
19+
20+
The [Adding lints](adding_lints.md) chapter is a walk through on how to add a
21+
new lint to Clippy. This is also interesting if you just want to fix a lint,
22+
because it also covers how to test lints and gives an overview of the bigger
23+
picture.
24+
25+
If you want to add a new lint or change existing ones apart from bugfixing, it's
26+
also a good idea to give the [stability guarantees][rfc_stability] and
27+
[lint categories][rfc_lint_cats] sections of the [Clippy 1.0 RFC][clippy_rfc] a
28+
quick read. The lint categories are also described [earlier in this
29+
book](../lints.md).
30+
31+
> _Note:_ Some higher level things about contributing to Clippy are still
32+
> covered in the [`CONTRIBUTING.md`] document. Some of those will be moved to
33+
> the book over time, like:
34+
> - Finding something to fix
35+
> - IDE setup
36+
> - High level overview on how Clippy works
37+
> - Triage procedure
38+
> - Bors and Homu
39+
40+
[clippy_rfc]: https://github.com/rust-lang/rfcs/blob/master/text/2476-clippy-uno.md
41+
[rfc_stability]: https://github.com/rust-lang/rfcs/blob/master/text/2476-clippy-uno.md#stability-guarantees
42+
[rfc_lint_cats]: https://github.com/rust-lang/rfcs/blob/master/text/2476-clippy-uno.md#lint-audit-and-categories
43+
[`CONTRIBUTING.md`]: https://github.com/rust-lang/rust-clippy/blob/master/CONTRIBUTING.md

0 commit comments

Comments
 (0)