Skip to content

Commit 8fb0041

Browse files
committed
Auto merge of #10248 - koka831:missing-config, r=xFrednet
Missing config This PR addresses https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Some.20lints.20miss.20its.20config/near/318460000. changelog: Documentation: Made sure that lint configurations on Clippy's lint list are all up to date [#10248](#10248) <!-- changelog_checked --> r? `@xFrednet` --- I have tried to create [a prototype](koka831#1), but have not yet found a good way to implement it. So I would like to put it aside for now and try again after addressing other issues so that I can understand how clippy works better:)
2 parents 96c28d1 + a9e6b12 commit 8fb0041

File tree

3 files changed

+29
-8
lines changed

3 files changed

+29
-8
lines changed

book/src/lint_configuration.md

+23-3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Please use that command to update the file and do not edit it by hand.
4343
| [allowed-scripts](#allowed-scripts) | `["Latin"]` |
4444
| [enable-raw-pointer-heuristic-for-send](#enable-raw-pointer-heuristic-for-send) | `true` |
4545
| [max-suggested-slice-pattern-length](#max-suggested-slice-pattern-length) | `3` |
46+
| [await-holding-invalid-types](#await-holding-invalid-types) | `[]` |
4647
| [max-include-file-size](#max-include-file-size) | `1000000` |
4748
| [allow-expect-in-tests](#allow-expect-in-tests) | `false` |
4849
| [allow-unwrap-in-tests](#allow-unwrap-in-tests) | `false` |
@@ -167,6 +168,17 @@ The minimum rust version that the project supports
167168
* [manual_clamp](https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp)
168169
* [manual_let_else](https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else)
169170
* [unchecked_duration_subtraction](https://rust-lang.github.io/rust-clippy/master/index.html#unchecked_duration_subtraction)
171+
* [collapsible_str_replace](https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace)
172+
* [seek_from_current](https://rust-lang.github.io/rust-clippy/master/index.html#seek_from_current)
173+
* [seek_rewind](https://rust-lang.github.io/rust-clippy/master/index.html#seek_rewind)
174+
* [unnecessary_lazy_evaluations](https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations)
175+
* [transmute_ptr_to_ref](https://rust-lang.github.io/rust-clippy/master/index.html#transmute_ptr_to_ref)
176+
* [almost_complete_range](https://rust-lang.github.io/rust-clippy/master/index.html#almost_complete_range)
177+
* [needless_borrow](https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow)
178+
* [derivable_impls](https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls)
179+
* [manual_is_ascii_check](https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check)
180+
* [manual_rem_euclid](https://rust-lang.github.io/rust-clippy/master/index.html#manual_rem_euclid)
181+
* [manual_retain](https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain)
170182

171183

172184
### cognitive-complexity-threshold
@@ -279,7 +291,7 @@ The minimum size (in bytes) to consider a type for passing by reference instead
279291

280292
**Default Value:** `256` (`u64`)
281293

282-
* [large_type_pass_by_move](https://rust-lang.github.io/rust-clippy/master/index.html#large_type_pass_by_move)
294+
* [large_types_passed_by_value](https://rust-lang.github.io/rust-clippy/master/index.html#large_types_passed_by_value)
283295

284296

285297
### too-many-lines-threshold
@@ -442,6 +454,14 @@ For example, `[_, _, _, e, ..]` is a slice pattern with 4 elements.
442454
* [index_refutable_slice](https://rust-lang.github.io/rust-clippy/master/index.html#index_refutable_slice)
443455

444456

457+
### await-holding-invalid-types
458+
459+
460+
**Default Value:** `[]` (`Vec<crate::utils::conf::DisallowedPath>`)
461+
462+
* [await_holding_invalid_type](https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_invalid_type)
463+
464+
445465
### max-include-file-size
446466
The maximum size of a file included via `include_bytes!()` or `include_str!()`, in bytes
447467

@@ -497,7 +517,7 @@ for the generic parameters for determining interior mutability
497517

498518
**Default Value:** `["bytes::Bytes"]` (`Vec<String>`)
499519

500-
* [mutable_key](https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key)
520+
* [mutable_key_type](https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type)
501521

502522

503523
### allow-mixed-uninlined-format-args
@@ -509,7 +529,7 @@ Whether to allow mixed uninlined format args, e.g. `format!("{} {}", a, foo.bar)
509529

510530

511531
### suppress-restriction-lint-in-const
512-
In same
532+
Whether to suppress a restriction lint in constant code. In same
513533
cases the restructured operation might not be unavoidable, as the
514534
suggested counterparts are unavailable in constant code. This
515535
configuration will cause restriction lints to trigger even

clippy_lints/src/methods/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1818,6 +1818,7 @@ declare_clippy_lint! {
18181818
/// - `or_else` to `or`
18191819
/// - `get_or_insert_with` to `get_or_insert`
18201820
/// - `ok_or_else` to `ok_or`
1821+
/// - `then` to `then_some` (for msrv >= 1.62.0)
18211822
///
18221823
/// ### Why is this bad?
18231824
/// Using eager evaluation is shorter and simpler in some cases.

clippy_lints/src/utils/conf.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ define_Conf! {
253253
///
254254
/// Suppress lints whenever the suggested change would cause breakage for other crates.
255255
(avoid_breaking_exported_api: bool = true),
256-
/// Lint: MANUAL_SPLIT_ONCE, MANUAL_STR_REPEAT, CLONED_INSTEAD_OF_COPIED, REDUNDANT_FIELD_NAMES, REDUNDANT_STATIC_LIFETIMES, FILTER_MAP_NEXT, CHECKED_CONVERSIONS, MANUAL_RANGE_CONTAINS, USE_SELF, MEM_REPLACE_WITH_DEFAULT, MANUAL_NON_EXHAUSTIVE, OPTION_AS_REF_DEREF, MAP_UNWRAP_OR, MATCH_LIKE_MATCHES_MACRO, MANUAL_STRIP, MISSING_CONST_FOR_FN, UNNESTED_OR_PATTERNS, FROM_OVER_INTO, PTR_AS_PTR, IF_THEN_SOME_ELSE_NONE, APPROX_CONSTANT, DEPRECATED_CFG_ATTR, INDEX_REFUTABLE_SLICE, MAP_CLONE, BORROW_AS_PTR, MANUAL_BITS, ERR_EXPECT, CAST_ABS_TO_UNSIGNED, UNINLINED_FORMAT_ARGS, MANUAL_CLAMP, MANUAL_LET_ELSE, UNCHECKED_DURATION_SUBTRACTION.
256+
/// Lint: MANUAL_SPLIT_ONCE, MANUAL_STR_REPEAT, CLONED_INSTEAD_OF_COPIED, REDUNDANT_FIELD_NAMES, REDUNDANT_STATIC_LIFETIMES, FILTER_MAP_NEXT, CHECKED_CONVERSIONS, MANUAL_RANGE_CONTAINS, USE_SELF, MEM_REPLACE_WITH_DEFAULT, MANUAL_NON_EXHAUSTIVE, OPTION_AS_REF_DEREF, MAP_UNWRAP_OR, MATCH_LIKE_MATCHES_MACRO, MANUAL_STRIP, MISSING_CONST_FOR_FN, UNNESTED_OR_PATTERNS, FROM_OVER_INTO, PTR_AS_PTR, IF_THEN_SOME_ELSE_NONE, APPROX_CONSTANT, DEPRECATED_CFG_ATTR, INDEX_REFUTABLE_SLICE, MAP_CLONE, BORROW_AS_PTR, MANUAL_BITS, ERR_EXPECT, CAST_ABS_TO_UNSIGNED, UNINLINED_FORMAT_ARGS, MANUAL_CLAMP, MANUAL_LET_ELSE, UNCHECKED_DURATION_SUBTRACTION, COLLAPSIBLE_STR_REPLACE, SEEK_FROM_CURRENT, SEEK_REWIND, UNNECESSARY_LAZY_EVALUATIONS, TRANSMUTE_PTR_TO_REF, ALMOST_COMPLETE_RANGE, NEEDLESS_BORROW, DERIVABLE_IMPLS, MANUAL_IS_ASCII_CHECK, MANUAL_REM_EUCLID, MANUAL_RETAIN.
257257
///
258258
/// The minimum rust version that the project supports
259259
(msrv: Option<String> = None),
@@ -323,7 +323,7 @@ define_Conf! {
323323
///
324324
/// The maximum size (in bytes) to consider a `Copy` type for passing by value instead of by reference.
325325
(trivial_copy_size_limit: Option<u64> = None),
326-
/// Lint: LARGE_TYPE_PASS_BY_MOVE.
326+
/// Lint: LARGE_TYPES_PASSED_BY_VALUE.
327327
///
328328
/// The minimum size (in bytes) to consider a type for passing by reference instead of by value.
329329
(pass_by_value_size_limit: u64 = 256),
@@ -411,7 +411,7 @@ define_Conf! {
411411
/// the slice pattern that is suggested. If more elements would be necessary, the lint is suppressed.
412412
/// For example, `[_, _, _, e, ..]` is a slice pattern with 4 elements.
413413
(max_suggested_slice_pattern_length: u64 = 3),
414-
/// Lint: AWAIT_HOLDING_INVALID_TYPE
414+
/// Lint: AWAIT_HOLDING_INVALID_TYPE.
415415
(await_holding_invalid_types: Vec<crate::utils::conf::DisallowedPath> = Vec::new()),
416416
/// Lint: LARGE_INCLUDE_FILE.
417417
///
@@ -437,7 +437,7 @@ define_Conf! {
437437
///
438438
/// The maximum size of the `Err`-variant in a `Result` returned from a function
439439
(large_error_threshold: u64 = 128),
440-
/// Lint: MUTABLE_KEY.
440+
/// Lint: MUTABLE_KEY_TYPE.
441441
///
442442
/// A list of paths to types that should be treated like `Arc`, i.e. ignored but
443443
/// for the generic parameters for determining interior mutability
@@ -446,7 +446,7 @@ define_Conf! {
446446
///
447447
/// Whether to allow mixed uninlined format args, e.g. `format!("{} {}", a, foo.bar)`
448448
(allow_mixed_uninlined_format_args: bool = true),
449-
/// Lint: INDEXING_SLICING
449+
/// Lint: INDEXING_SLICING.
450450
///
451451
/// Whether to suppress a restriction lint in constant code. In same
452452
/// cases the restructured operation might not be unavoidable, as the

0 commit comments

Comments
 (0)