rust-clippy/book/src
bors 00001d6e08 Auto merge of #10699 - blyxyas:book-lint_config, r=flip1995
Clippy Book Chapter Updates Reborn: Refresh Lint Configuration's looks

This PR modernizes and clears up some confusion with the "Lint Configuration Options" chapter from the book.

### Changes

- **Remove 'Option - Default Value" table**

    - Why was it even there?
    - It shouldn't be the first thing an user sees when they enter the chapter. It's clunky, ugly and not useful. The default values for configs are stated in a per-config basis if needed.

- **Add a simple description of what the chapter contains, and the scheme of each configuration option**

- **Minor formatting, mainly adding code fragments to code text**

    - It seemed weird and jarring not having back-ticks on text like "arithmetic_side_effects".
    -  Improves readability and separation between configs.

- **Separate a little bit the Affected Lints list + "Affected lists" message**

    - Not having something indicating that the list is about the lints that use the configuration option is confusing.
    - It isn't as important as the description and example. Therefore should be separated a little bit imo

---

This is an independent effort from #10597, but as it's still a Book Chapter Update, I thought it would be cool to include it here. I'm going to keep the reviewing process for this PR to rustbot's desires.

[Rendered](https://github.com/blyxyas/rust-clippy/blob/book-lint_config/book/src/lint_configuration.md)
[Current](https://github.com/rust-lang/rust-clippy/blob/master/book/src/lint_configuration.md)

changelog: Refresh styling from the "Lint Configuration Options" book chapter.
2023-06-02 12:51:26 +00:00
..
continuous_integration Merge commit '3c7e7dbc1583a0b06df5bd7623dd354a4debd23d' into clippyup 2022-07-28 19:08:22 +02:00
development Explain path-search using a list 2023-06-01 12:54:20 +02:00
configuration.md Explain path-search using a list 2023-06-01 12:54:20 +02:00
installation.md Gramar, and spelin kleanup 2023-03-30 15:31:14 -04:00
lint_configuration.md Refresh Lint Configuration's looks 2023-05-09 21:39:24 +02:00
lints.md Gramar, and spelin kleanup 2023-03-30 15:31:14 -04:00
README.md Gramar, and spelin kleanup 2023-03-30 15:31:14 -04:00
SUMMARY.md Auto merge of #10652 - blyxyas:book-macro_expansions, r=flip1995 2023-04-16 21:17:46 +00:00
usage.md Add the warning to all documentation. 2023-04-25 02:05:32 +02:00

Clippy

Clippy Test License: MIT OR Apache-2.0

A collection of lints to catch common mistakes and improve your Rust code.

There are over 600 lints included in this crate!

Lints are divided into categories, each with a default lint level. You can choose how much Clippy is supposed to annoy help you by changing the lint level by category.

Category Description Default level
clippy::all all lints that are on by default (correctness, suspicious, style, complexity, perf) warn/deny
clippy::correctness code that is outright wrong or useless deny
clippy::suspicious code that is most likely wrong or useless warn
clippy::complexity code that does something simple but in a complex way warn
clippy::perf code that can be written to run faster warn
clippy::style code that should be written in a more idiomatic way warn
clippy::pedantic lints which are rather strict or might have false positives allow
clippy::nursery new lints that are still under development allow
clippy::cargo lints for the cargo manifest allow

More to come, please file an issue if you have ideas!

The lint list also contains "restriction lints", which are for things which are usually not considered "bad", but may be useful to turn on in specific cases. These should be used very selectively, if at all.