@@ -5,8 +5,33 @@ and registration of the lint in Clippy's codebase.
5
5
We can use the Clippy dev tools to handle this step since setting up the
6
6
lint involves some boilerplate code.
7
7
8
- In our example, we're going to create a lint to detect functions named ` foo ` because it is a highly non-descriptive
9
- name for a function, so we want to trigger this and fix it early in the development process.
8
+ #### Lint types
9
+
10
+ A lint type is the category of items and expressions in which your lint focuses on.
11
+
12
+ As of the writing of this documentation update, there are 12 groups (a.k.a. _ types_ )
13
+ of lints besides the numerous standalone lints living under ` clippy_lints/src/ ` :
14
+
15
+ - ` cargo `
16
+ - ` casts `
17
+ - ` functions `
18
+ - ` loops `
19
+ - ` matches `
20
+ - ` methods `
21
+ - ` misc_early `
22
+ - ` operators `
23
+ - ` transmute `
24
+ - ` types `
25
+ - ` unit_types `
26
+ - ` utils / internal ` (Clippy internal lints)
27
+
28
+ These types group together lints that share some common behaviors.
29
+ For instance, ` functions ` groups together lints
30
+ that deal with some aspects of function calls in Rust.
31
+
32
+ For more information, feel free to compare the lint files under any category
33
+ with [ All Clippy lints] [ all_lints ] or
34
+ ask one of the maintainers.
10
35
11
36
## Lint name
12
37
@@ -110,31 +135,6 @@ Untracked files:
110
135
tests/ui/foo_functions.rs
111
136
```
112
137
113
- #### Lint types
114
-
115
- As of the writing of this documentation update, there are 12 groups (a.k.a. _ types_ )
116
- of lints besides the numerous standalone lints living under ` clippy_lints/src/ ` :
117
-
118
- - ` cargo `
119
- - ` casts `
120
- - ` functions `
121
- - ` loops `
122
- - ` matches `
123
- - ` methods `
124
- - ` misc_early `
125
- - ` operators `
126
- - ` transmute `
127
- - ` types `
128
- - ` unit_types `
129
- - ` utils / internal ` (Clippy internal lints)
130
-
131
- These categories group together lints that share some common behaviors.
132
- For instance, as we have mentioned earlier, ` functions ` groups together lints
133
- that deal with some aspects of function calls in Rust.
134
-
135
- For more information, feel free to compare the lint files under any category
136
- with [ All Clippy lints] [ all_lints ] or
137
- ask one of the maintainers.
138
138
139
139
## The ` define_clippy_lints ` macro
140
140
0 commit comments