Skip to content

Commit ff634e2

Browse files
committed
Change contrib.md hierarchy, link to it from readme
'How Clippy works' and 'How to fix nightly failures' are not exactly part of 'Writing code'.
1 parent a416c5e commit ff634e2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ All contributors are expected to follow the [Rust Code of Conduct](http://www.ru
1919
* [Running test suite](#running-test-suite)
2020
* [Running rustfmt](#running-rustfmt)
2121
* [Testing manually](#testing-manually)
22-
* [How Clippy works](#how-clippy-works)
23-
* [Fixing nightly build failures](#fixing-build-failures-caused-by-rust)
22+
* [How Clippy works](#how-clippy-works)
23+
* [Fixing nightly build failures](#fixing-build-failures-caused-by-rust)
2424
* [Issue and PR Triage](#issue-and-pr-triage)
2525
* [Bors and Homu](#bors-and-homu)
2626
* [Contributions](#contributions)
@@ -168,7 +168,7 @@ Manually testing against an example file is useful if you have added some
168168
local modifications, run `env CLIPPY_TESTS=true cargo run --bin clippy-driver -- -L ./target/debug input.rs`
169169
from the working copy root.
170170

171-
### How Clippy works
171+
## How Clippy works
172172

173173
Clippy is a [rustc compiler plugin][compiler_plugin]. The main entry point is at [`src/lib.rs`][main_entry]. In there, the lint registration is delegated to the [`clippy_lints`][lint_crate] crate.
174174

@@ -218,7 +218,7 @@ The difference between `EarlyLintPass` and `LateLintPass` is that the methods of
218218

219219
That's why the `else_if_without_else` example uses the `register_early_lint_pass` function. Because the [actual lint logic][else_if_without_else] does not depend on any type information.
220220

221-
### Fixing build failures caused by Rust
221+
## Fixing build failures caused by Rust
222222

223223
Clippy will sometimes fail to build from source because building it depends on unstable internal Rust features. Most of the times we have to adapt to the changes and only very rarely there's an actual bug in Rust. Fixing build failures caused by Rust updates, can be a good way to learn about Rust internals.
224224

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ Note: `deny` produces errors instead of warnings.
151151

152152
If you do not want to include your lint levels in your code, you can globally enable/disable lints by passing extra flags to Clippy during the run: `cargo clippy -- -A clippy::lint_name` will run Clippy with `lint_name` disabled and `cargo clippy -- -W clippy::lint_name` will run it with that enabled. This also works with lint groups. For example you can run Clippy with warnings for all lints enabled: `cargo clippy -- -W clippy::pedantic`
153153

154+
## [Contributing](https://github.com/rust-lang/rust-clippy/blob/master/CONTRIBUTING.md)
155+
154156
## License
155157

156158
Copyright 2014-2018 The Rust Project Developers

0 commit comments

Comments
 (0)