Skip to content

Commit f53fce5

Browse files
committed
Make extendable configs easier to add
1 parent f74037e commit f53fce5

File tree

4 files changed

+172
-115
lines changed

4 files changed

+172
-115
lines changed

book/src/lint_configuration.md

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ and lints affected.
1313
## `absolute-paths-allowed-crates`
1414
Which crates to allow absolute paths from
1515

16-
**Default Value:** `[]`
17-
1816
---
1917
**Affected lints:**
2018
* [`absolute_paths`](https://rust-lang.github.io/rust-clippy/master/index.html#absolute_paths)
@@ -177,8 +175,6 @@ Whether `useless_vec` should ignore test functions or `#[cfg(test)]`
177175
## `allowed-dotfiles`
178176
Additional dotfiles (files or directories starting with a dot) to allow
179177

180-
**Default Value:** `[]`
181-
182178
---
183179
**Affected lints:**
184180
* [`path_ends_with_ext`](https://rust-lang.github.io/rust-clippy/master/index.html#path_ends_with_ext)
@@ -187,8 +183,6 @@ Additional dotfiles (files or directories starting with a dot) to allow
187183
## `allowed-duplicate-crates`
188184
A list of crate names to allow duplicates of
189185

190-
**Default Value:** `[]`
191-
192186
---
193187
**Affected lints:**
194188
* [`multiple_crate_versions`](https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions)
@@ -199,7 +193,7 @@ Allowed names below the minimum allowed characters. The value `".."` can be used
199193
the list to indicate, that the configured values should be appended to the default
200194
configuration of Clippy. By default, any configuration will replace the default value.
201195

202-
**Default Value:** `["j", "z", "i", "y", "n", "x", "w"]`
196+
**Default Value:** `["i", "j", "x", "y", "z", "w", "n"]`
203197

204198
---
205199
**Affected lints:**
@@ -257,8 +251,6 @@ allowed-wildcard-imports = [ "utils", "common" ]
257251
2. Paths with any segment that containing the word 'prelude'
258252
are already allowed by default.
259253

260-
**Default Value:** `[]`
261-
262254
---
263255
**Affected lints:**
264256
* [`wildcard_imports`](https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports)
@@ -280,8 +272,6 @@ arithmetic-side-effects-allowed = ["SomeType", "AnotherType"]
280272
A type, say `SomeType`, listed in this configuration has the same behavior of
281273
`["SomeType" , "*"], ["*", "SomeType"]` in `arithmetic_side_effects_allowed_binary`.
282274

283-
**Default Value:** `[]`
284-
285275
---
286276
**Affected lints:**
287277
* [`arithmetic_side_effects`](https://rust-lang.github.io/rust-clippy/master/index.html#arithmetic_side_effects)
@@ -303,8 +293,6 @@ Pairs are asymmetric, which means that `["SomeType", "AnotherType"]` is not the
303293
arithmetic-side-effects-allowed-binary = [["SomeType" , "f32"], ["AnotherType", "*"]]
304294
```
305295

306-
**Default Value:** `[]`
307-
308296
---
309297
**Affected lints:**
310298
* [`arithmetic_side_effects`](https://rust-lang.github.io/rust-clippy/master/index.html#arithmetic_side_effects)
@@ -319,8 +307,6 @@ Suppress checking of the passed type names in unary operations like "negation" (
319307
arithmetic-side-effects-allowed-unary = ["SomeType", "AnotherType"]
320308
```
321309

322-
**Default Value:** `[]`
323-
324310
---
325311
**Affected lints:**
326312
* [`arithmetic_side_effects`](https://rust-lang.github.io/rust-clippy/master/index.html#arithmetic_side_effects)
@@ -366,8 +352,6 @@ Suppress lints whenever the suggested change would cause breakage for other crat
366352
## `await-holding-invalid-types`
367353

368354

369-
**Default Value:** `[]`
370-
371355
---
372356
**Affected lints:**
373357
* [`await_holding_invalid_type`](https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_invalid_type)
@@ -409,8 +393,6 @@ The maximum cognitive complexity a function can have
409393
## `disallowed-macros`
410394
The list of disallowed macros, written as fully qualified paths.
411395

412-
**Default Value:** `[]`
413-
414396
---
415397
**Affected lints:**
416398
* [`disallowed_macros`](https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros)
@@ -419,8 +401,6 @@ The list of disallowed macros, written as fully qualified paths.
419401
## `disallowed-methods`
420402
The list of disallowed methods, written as fully qualified paths.
421403

422-
**Default Value:** `[]`
423-
424404
---
425405
**Affected lints:**
426406
* [`disallowed_methods`](https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods)
@@ -441,8 +421,6 @@ default configuration of Clippy. By default, any configuration will replace the
441421
## `disallowed-types`
442422
The list of disallowed types, written as fully qualified paths.
443423

444-
**Default Value:** `[]`
445-
446424
---
447425
**Affected lints:**
448426
* [`disallowed_types`](https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_types)
@@ -455,7 +433,7 @@ default configuration of Clippy. By default, any configuration will replace the
455433
* `doc-valid-idents = ["ClipPy"]` would replace the default list with `["ClipPy"]`.
456434
* `doc-valid-idents = ["ClipPy", ".."]` would append `ClipPy` to the default list.
457435

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

460438
---
461439
**Affected lints:**
@@ -501,8 +479,6 @@ for _ in &mut *rmvec {}
501479
## `enforced-import-renames`
502480
The list of imports to always rename, a fully qualified path followed by the rename.
503481

504-
**Default Value:** `[]`
505-
506482
---
507483
**Affected lints:**
508484
* [`missing_enforced_import_renames`](https://rust-lang.github.io/rust-clippy/master/index.html#missing_enforced_import_renames)
@@ -795,8 +771,6 @@ A `MacroMatcher` can be added like so `{ name = "macro_name", brace = "(" }`. If
795771
could be used with a full path two `MacroMatcher`s have to be added one with the full path
796772
`crate_name::macro_name` and one with just the macro name.
797773

798-
**Default Value:** `[]`
799-
800774
---
801775
**Affected lints:**
802776
* [`nonstandard_macro_braces`](https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces)

0 commit comments

Comments
 (0)