Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 49bf726

Browse files
committedMay 17, 2025·
Change default max-variable-name-length to 100
1 parent 8784e14 commit 49bf726

File tree

5 files changed

+2
-8
lines changed

5 files changed

+2
-8
lines changed
 

‎book/src/lint_configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ The maximum number of bounds a trait can have to be linted
737737
## `max-variable-name-length`
738738
The maximum length of a variable
739739

740-
**Default Value:** `30`
740+
**Default Value:** `100`
741741

742742
---
743743
**Affected lints:**

‎clippy.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ check-inconsistent-struct-field-initializers = true
44

55
lint-commented-code = true
66

7-
max-variable-name-length = 45
8-
97
[[disallowed-methods]]
108
path = "rustc_lint::context::LintContext::lint"
119
reason = "this function does not add a link to our documentation, please use the `clippy_utils::diagnostics::span_lint*` functions instead"

‎clippy_config/src/conf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ define_Conf! {
677677
max_trait_bounds: u64 = 3,
678678
/// The maximum length of a variable
679679
#[lints(long_variable_names)]
680-
max_variable_name_length: u64 = 30,
680+
max_variable_name_length: u64 = 100,
681681
/// Minimum chars an ident can have, anything below or equal to this will be linted.
682682
#[lints(min_ident_chars)]
683683
min_ident_chars_threshold: u64 = 1,
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
# default configuration has `accept-comment-above-statement` and
22
# `accept-comment-above-attributes` true
3-
4-
max-variable-name-length = 80
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
# test with these options disabled
22
accept-comment-above-statement = false
33
accept-comment-above-attributes = false
4-
5-
max-variable-name-length = 80

0 commit comments

Comments
 (0)
Please sign in to comment.