Skip to content

Commit 10ba798

Browse files
committed
Auto merge of #13093 - waywardmonkeys:more-doc-valid-idents, r=Alexendoo
Add more doc-valid-idents * "AccessKit" is a commonly used accessibility toolkit used in Rust GUIs. * "CoreFoundation", "CoreGraphics", "CoreText" are frameworks on Apple OSes. * "Direct2D", "Direct3D", "DirectWrite" are frameworks on Windows * "PostScript" is a programming language and is mentioned when talking about text and vector graphics. * "OpenAL" is an audio framework / API. * "OpenType" is a font format (TrueType is already mentioned). * "WebRTC", "WebSocket", "WebTransport" are web networking technologies. * "NetBSD" and "OpenBSD" are like the already included FreeBSD. changelog: [`doc_markdown`]: Add AccessKit, CoreFoundation, CoreGraphics, CoreText, Direct2D, Direct3D, DirectWrite, PostScript, OpenAL, OpenType, WebRTC, WebSocket, WebTransport, NetBSD, and OpenBSD to `doc-valid-idents`.
2 parents 206e4ad + 39378cf commit 10ba798

File tree

5 files changed

+47
-38
lines changed

5 files changed

+47
-38
lines changed

book/src/lint_configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ default configuration of Clippy. By default, any configuration will replace the
455455
* `doc-valid-idents = ["ClipPy"]` would replace the default list with `["ClipPy"]`.
456456
* `doc-valid-idents = ["ClipPy", ".."]` would append `ClipPy` to the default list.
457457

458-
**Default Value:** `["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "DevOps", "DirectX", "ECMAScript", "GPLv2", "GPLv3", "GitHub", "GitLab", "IPv4", "IPv6", "ClojureScript", "CoffeeScript", "JavaScript", "PureScript", "TypeScript", "WebAssembly", "NaN", "NaNs", "OAuth", "GraphQL", "OCaml", "OpenDNS", "OpenGL", "OpenMP", "OpenSSH", "OpenSSL", "OpenStreetMap", "OpenTelemetry", "WebGL", "WebGL2", "WebGPU", "WebP", "OpenExr", "YCbCr", "sRGB", "TensorFlow", "TrueType", "iOS", "macOS", "FreeBSD", "TeX", "LaTeX", "BibTeX", "BibLaTeX", "MinGW", "CamelCase"]`
458+
**Default Value:** `["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "AccessKit", "CoreFoundation", "CoreGraphics", "CoreText", "DevOps", "Direct2D", "Direct3D", "DirectWrite", "DirectX", "ECMAScript", "GPLv2", "GPLv3", "GitHub", "GitLab", "IPv4", "IPv6", "ClojureScript", "CoffeeScript", "JavaScript", "PostScript", "PureScript", "TypeScript", "WebAssembly", "NaN", "NaNs", "OAuth", "GraphQL", "OCaml", "OpenAL", "OpenDNS", "OpenGL", "OpenMP", "OpenSSH", "OpenSSL", "OpenStreetMap", "OpenTelemetry", "OpenType", "WebGL", "WebGL2", "WebGPU", "WebRTC", "WebSocket", "WebTransport", "WebP", "OpenExr", "YCbCr", "sRGB", "TensorFlow", "TrueType", "iOS", "macOS", "FreeBSD", "NetBSD", "OpenBSD", "TeX", "LaTeX", "BibTeX", "BibLaTeX", "MinGW", "CamelCase"]`
459459

460460
---
461461
**Affected lints:**

clippy_config/src/conf.rs

+8-5
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,26 @@ use std::{cmp, env, fmt, fs, io};
1818
#[rustfmt::skip]
1919
const DEFAULT_DOC_VALID_IDENTS: &[&str] = &[
2020
"KiB", "MiB", "GiB", "TiB", "PiB", "EiB",
21+
"AccessKit",
22+
"CoreFoundation", "CoreGraphics", "CoreText",
2123
"DevOps",
22-
"DirectX",
24+
"Direct2D", "Direct3D", "DirectWrite", "DirectX",
2325
"ECMAScript",
2426
"GPLv2", "GPLv3",
2527
"GitHub", "GitLab",
2628
"IPv4", "IPv6",
27-
"ClojureScript", "CoffeeScript", "JavaScript", "PureScript", "TypeScript",
29+
"ClojureScript", "CoffeeScript", "JavaScript", "PostScript", "PureScript", "TypeScript",
2830
"WebAssembly",
2931
"NaN", "NaNs",
3032
"OAuth", "GraphQL",
3133
"OCaml",
32-
"OpenDNS", "OpenGL", "OpenMP", "OpenSSH", "OpenSSL", "OpenStreetMap", "OpenTelemetry",
33-
"WebGL", "WebGL2", "WebGPU",
34+
"OpenAL", "OpenDNS", "OpenGL", "OpenMP", "OpenSSH", "OpenSSL", "OpenStreetMap", "OpenTelemetry",
35+
"OpenType",
36+
"WebGL", "WebGL2", "WebGPU", "WebRTC", "WebSocket", "WebTransport",
3437
"WebP", "OpenExr", "YCbCr", "sRGB",
3538
"TensorFlow",
3639
"TrueType",
37-
"iOS", "macOS", "FreeBSD",
40+
"iOS", "macOS", "FreeBSD", "NetBSD", "OpenBSD",
3841
"TeX", "LaTeX", "BibTeX", "BibLaTeX",
3942
"MinGW",
4043
"CamelCase",

tests/ui/doc/doc-fixable.fixed

+8-5
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,24 @@ fn test_units() {
5454

5555
/// This tests allowed identifiers.
5656
/// KiB MiB GiB TiB PiB EiB
57-
/// DirectX
57+
/// AccessKit
58+
/// CoreFoundation CoreGraphics CoreText
59+
/// Direct2D Direct3D DirectWrite DirectX
5860
/// ECMAScript
5961
/// GPLv2 GPLv3
6062
/// GitHub GitLab
6163
/// IPv4 IPv6
62-
/// ClojureScript CoffeeScript JavaScript PureScript TypeScript
64+
/// ClojureScript CoffeeScript JavaScript PostScript PureScript TypeScript
6365
/// WebAssembly
6466
/// NaN NaNs
6567
/// OAuth GraphQL
6668
/// OCaml
67-
/// OpenDNS OpenGL OpenMP OpenSSH OpenSSL OpenStreetMap OpenTelemetry
68-
/// WebGL WebGL2 WebGPU
69+
/// OpenAL OpenDNS OpenGL OpenMP OpenSSH OpenSSL OpenStreetMap OpenTelemetry
70+
/// OpenType
71+
/// WebGL WebGL2 WebGPU WebRTC WebSocket WebTransport
6972
/// TensorFlow
7073
/// TrueType
71-
/// iOS macOS FreeBSD
74+
/// iOS macOS FreeBSD NetBSD OpenBSD
7275
/// TeX LaTeX BibTeX BibLaTeX
7376
/// MinGW
7477
/// CamelCase (see also #2395)

tests/ui/doc/doc-fixable.rs

+8-5
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,24 @@ fn test_units() {
5454

5555
/// This tests allowed identifiers.
5656
/// KiB MiB GiB TiB PiB EiB
57-
/// DirectX
57+
/// AccessKit
58+
/// CoreFoundation CoreGraphics CoreText
59+
/// Direct2D Direct3D DirectWrite DirectX
5860
/// ECMAScript
5961
/// GPLv2 GPLv3
6062
/// GitHub GitLab
6163
/// IPv4 IPv6
62-
/// ClojureScript CoffeeScript JavaScript PureScript TypeScript
64+
/// ClojureScript CoffeeScript JavaScript PostScript PureScript TypeScript
6365
/// WebAssembly
6466
/// NaN NaNs
6567
/// OAuth GraphQL
6668
/// OCaml
67-
/// OpenDNS OpenGL OpenMP OpenSSH OpenSSL OpenStreetMap OpenTelemetry
68-
/// WebGL WebGL2 WebGPU
69+
/// OpenAL OpenDNS OpenGL OpenMP OpenSSH OpenSSL OpenStreetMap OpenTelemetry
70+
/// OpenType
71+
/// WebGL WebGL2 WebGPU WebRTC WebSocket WebTransport
6972
/// TensorFlow
7073
/// TrueType
71-
/// iOS macOS FreeBSD
74+
/// iOS macOS FreeBSD NetBSD OpenBSD
7275
/// TeX LaTeX BibTeX BibLaTeX
7376
/// MinGW
7477
/// CamelCase (see also #2395)

tests/ui/doc/doc-fixable.stderr

+22-22
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ LL | /// `be_sure_we_got_to_the_end_of_it`
133133
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
134134

135135
error: item in documentation is missing backticks
136-
--> tests/ui/doc/doc-fixable.rs:75:5
136+
--> tests/ui/doc/doc-fixable.rs:78:5
137137
|
138138
LL | /// be_sure_we_got_to_the_end_of_it
139139
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -144,7 +144,7 @@ LL | /// `be_sure_we_got_to_the_end_of_it`
144144
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
145145

146146
error: item in documentation is missing backticks
147-
--> tests/ui/doc/doc-fixable.rs:92:5
147+
--> tests/ui/doc/doc-fixable.rs:95:5
148148
|
149149
LL | /// be_sure_we_got_to_the_end_of_it
150150
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -155,7 +155,7 @@ LL | /// `be_sure_we_got_to_the_end_of_it`
155155
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
156156

157157
error: item in documentation is missing backticks
158-
--> tests/ui/doc/doc-fixable.rs:100:8
158+
--> tests/ui/doc/doc-fixable.rs:103:8
159159
|
160160
LL | /// ## CamelCaseThing
161161
| ^^^^^^^^^^^^^^
@@ -166,7 +166,7 @@ LL | /// ## `CamelCaseThing`
166166
| ~~~~~~~~~~~~~~~~
167167

168168
error: item in documentation is missing backticks
169-
--> tests/ui/doc/doc-fixable.rs:103:7
169+
--> tests/ui/doc/doc-fixable.rs:106:7
170170
|
171171
LL | /// # CamelCaseThing
172172
| ^^^^^^^^^^^^^^
@@ -177,7 +177,7 @@ LL | /// # `CamelCaseThing`
177177
| ~~~~~~~~~~~~~~~~
178178

179179
error: item in documentation is missing backticks
180-
--> tests/ui/doc/doc-fixable.rs:105:22
180+
--> tests/ui/doc/doc-fixable.rs:108:22
181181
|
182182
LL | /// Not a title #897 CamelCaseThing
183183
| ^^^^^^^^^^^^^^
@@ -188,7 +188,7 @@ LL | /// Not a title #897 `CamelCaseThing`
188188
| ~~~~~~~~~~~~~~~~
189189

190190
error: item in documentation is missing backticks
191-
--> tests/ui/doc/doc-fixable.rs:106:5
191+
--> tests/ui/doc/doc-fixable.rs:109:5
192192
|
193193
LL | /// be_sure_we_got_to_the_end_of_it
194194
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -199,7 +199,7 @@ LL | /// `be_sure_we_got_to_the_end_of_it`
199199
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
200200

201201
error: item in documentation is missing backticks
202-
--> tests/ui/doc/doc-fixable.rs:113:5
202+
--> tests/ui/doc/doc-fixable.rs:116:5
203203
|
204204
LL | /// be_sure_we_got_to_the_end_of_it
205205
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -210,7 +210,7 @@ LL | /// `be_sure_we_got_to_the_end_of_it`
210210
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
211211

212212
error: item in documentation is missing backticks
213-
--> tests/ui/doc/doc-fixable.rs:126:5
213+
--> tests/ui/doc/doc-fixable.rs:129:5
214214
|
215215
LL | /// be_sure_we_got_to_the_end_of_it
216216
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -221,7 +221,7 @@ LL | /// `be_sure_we_got_to_the_end_of_it`
221221
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
222222

223223
error: item in documentation is missing backticks
224-
--> tests/ui/doc/doc-fixable.rs:137:43
224+
--> tests/ui/doc/doc-fixable.rs:140:43
225225
|
226226
LL | /** E.g., serialization of an empty list: FooBar
227227
| ^^^^^^
@@ -232,7 +232,7 @@ LL | /** E.g., serialization of an empty list: `FooBar`
232232
| ~~~~~~~~
233233

234234
error: item in documentation is missing backticks
235-
--> tests/ui/doc/doc-fixable.rs:142:5
235+
--> tests/ui/doc/doc-fixable.rs:145:5
236236
|
237237
LL | And BarQuz too.
238238
| ^^^^^^
@@ -243,7 +243,7 @@ LL | And `BarQuz` too.
243243
| ~~~~~~~~
244244

245245
error: item in documentation is missing backticks
246-
--> tests/ui/doc/doc-fixable.rs:143:1
246+
--> tests/ui/doc/doc-fixable.rs:146:1
247247
|
248248
LL | be_sure_we_got_to_the_end_of_it
249249
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -254,7 +254,7 @@ LL | `be_sure_we_got_to_the_end_of_it`
254254
|
255255

256256
error: item in documentation is missing backticks
257-
--> tests/ui/doc/doc-fixable.rs:148:43
257+
--> tests/ui/doc/doc-fixable.rs:151:43
258258
|
259259
LL | /** E.g., serialization of an empty list: FooBar
260260
| ^^^^^^
@@ -265,7 +265,7 @@ LL | /** E.g., serialization of an empty list: `FooBar`
265265
| ~~~~~~~~
266266

267267
error: item in documentation is missing backticks
268-
--> tests/ui/doc/doc-fixable.rs:153:5
268+
--> tests/ui/doc/doc-fixable.rs:156:5
269269
|
270270
LL | And BarQuz too.
271271
| ^^^^^^
@@ -276,7 +276,7 @@ LL | And `BarQuz` too.
276276
| ~~~~~~~~
277277

278278
error: item in documentation is missing backticks
279-
--> tests/ui/doc/doc-fixable.rs:154:1
279+
--> tests/ui/doc/doc-fixable.rs:157:1
280280
|
281281
LL | be_sure_we_got_to_the_end_of_it
282282
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -287,7 +287,7 @@ LL | `be_sure_we_got_to_the_end_of_it`
287287
|
288288

289289
error: item in documentation is missing backticks
290-
--> tests/ui/doc/doc-fixable.rs:165:5
290+
--> tests/ui/doc/doc-fixable.rs:168:5
291291
|
292292
LL | /// be_sure_we_got_to_the_end_of_it
293293
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -298,7 +298,7 @@ LL | /// `be_sure_we_got_to_the_end_of_it`
298298
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
299299

300300
error: item in documentation is missing backticks
301-
--> tests/ui/doc/doc-fixable.rs:184:22
301+
--> tests/ui/doc/doc-fixable.rs:187:22
302302
|
303303
LL | /// An iterator over mycrate::Collection's values.
304304
| ^^^^^^^^^^^^^^^^^^^
@@ -309,7 +309,7 @@ LL | /// An iterator over `mycrate::Collection`'s values.
309309
| ~~~~~~~~~~~~~~~~~~~~~
310310

311311
error: item in documentation is missing backticks
312-
--> tests/ui/doc/doc-fixable.rs:208:34
312+
--> tests/ui/doc/doc-fixable.rs:211:34
313313
|
314314
LL | /// Foo \[bar\] \[baz\] \[qux\]. DocMarkdownLint
315315
| ^^^^^^^^^^^^^^^
@@ -320,7 +320,7 @@ LL | /// Foo \[bar\] \[baz\] \[qux\]. `DocMarkdownLint`
320320
| ~~~~~~~~~~~~~~~~~
321321

322322
error: item in documentation is missing backticks
323-
--> tests/ui/doc/doc-fixable.rs:231:22
323+
--> tests/ui/doc/doc-fixable.rs:234:22
324324
|
325325
LL | /// There is no try (do() or do_not()).
326326
| ^^^^
@@ -331,7 +331,7 @@ LL | /// There is no try (`do()` or do_not()).
331331
| ~~~~~~
332332

333333
error: item in documentation is missing backticks
334-
--> tests/ui/doc/doc-fixable.rs:231:30
334+
--> tests/ui/doc/doc-fixable.rs:234:30
335335
|
336336
LL | /// There is no try (do() or do_not()).
337337
| ^^^^^^^^
@@ -342,7 +342,7 @@ LL | /// There is no try (do() or `do_not()`).
342342
| ~~~~~~~~~~
343343

344344
error: item in documentation is missing backticks
345-
--> tests/ui/doc/doc-fixable.rs:234:5
345+
--> tests/ui/doc/doc-fixable.rs:237:5
346346
|
347347
LL | /// ABes
348348
| ^^^^
@@ -353,7 +353,7 @@ LL | /// `ABes`
353353
| ~~~~~~
354354

355355
error: item in documentation is missing backticks
356-
--> tests/ui/doc/doc-fixable.rs:240:9
356+
--> tests/ui/doc/doc-fixable.rs:243:9
357357
|
358358
LL | /// foo()
359359
| ^^^^^
@@ -364,7 +364,7 @@ LL | /// `foo()`
364364
| ~~~~~~~
365365

366366
error: you should put bare URLs between `<`/`>` or make a proper Markdown link
367-
--> tests/ui/doc/doc-fixable.rs:244:5
367+
--> tests/ui/doc/doc-fixable.rs:247:5
368368
|
369369
LL | /// https://github.com/rust-lang/rust-clippy/pull/12836
370370
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `<https://github.com/rust-lang/rust-clippy/pull/12836>`

0 commit comments

Comments
 (0)