about summary refs log tree commit diff
diff options
context:
space:
mode:
authorblyxyas <blyxyas@gmail.com>2023-04-17 23:51:59 +0200
committerPhilipp Krones <hello@philkrones.com>2023-08-16 14:30:39 +0200
commitb91d676b60b23227698c9449bed561b6c759e4db (patch)
tree2a6bcd625791f27f4eda07336bcf5713c8a1f721
parent74654362703de5d274e7fcc4e29ce7f6a114e566 (diff)
downloadrust-b91d676b60b23227698c9449bed561b6c759e4db.tar.gz
rust-b91d676b60b23227698c9449bed561b6c759e4db.zip
Move "Lint types to the top"
-rw-r--r--book/src/development/defining_lints.md54
1 files changed, 27 insertions, 27 deletions
diff --git a/book/src/development/defining_lints.md b/book/src/development/defining_lints.md
index 44806c0cb85..e0dc2102459 100644
--- a/book/src/development/defining_lints.md
+++ b/book/src/development/defining_lints.md
@@ -5,8 +5,33 @@ and registration of the lint in Clippy's codebase.
 We can use the Clippy dev tools to handle this step since setting up the 
 lint involves some boilerplate code.
 
-In our example, we're going to create a lint to detect functions named `foo` because it is a highly non-descriptive
-name for a function, so we want to trigger this and fix it early in the development process.
+#### Lint types
+
+A lint type is the category of items and expressions in which your lint focuses on.
+
+As of the writing of this documentation update, there are 12 groups (a.k.a. _types_)
+of lints besides the numerous standalone lints living under `clippy_lints/src/`:
+
+- `cargo`
+- `casts`
+- `functions`
+- `loops`
+- `matches`
+- `methods`
+- `misc_early`
+- `operators`
+- `transmute`
+- `types`
+- `unit_types`
+- `utils / internal` (Clippy internal lints)
+
+These types group together lints that share some common behaviors.
+For instance, `functions` groups together lints
+that deal with some aspects of function calls in Rust.
+
+For more information, feel free to compare the lint files under any category
+with [All Clippy lints][all_lints] or
+ask one of the maintainers.
 
 ## Lint name
 
@@ -110,31 +135,6 @@ Untracked files:
 	tests/ui/foo_functions.rs
 ```
 
-#### Lint types
-
-As of the writing of this documentation update, there are 12 groups (a.k.a. _types_)
-of lints besides the numerous standalone lints living under `clippy_lints/src/`:
-
-- `cargo`
-- `casts`
-- `functions`
-- `loops`
-- `matches`
-- `methods`
-- `misc_early`
-- `operators`
-- `transmute`
-- `types`
-- `unit_types`
-- `utils / internal` (Clippy internal lints)
-
-These categories group together lints that share some common behaviors.
-For instance, as we have mentioned earlier, `functions` groups together lints
-that deal with some aspects of function calls in Rust.
-
-For more information, feel free to compare the lint files under any category
-with [All Clippy lints][all_lints] or
-ask one of the maintainers.
 
 ## The `define_clippy_lints` macro