Skip to content

Commit c01aa64

Browse files
committed
Small documentation update for the new metadata_collector
1 parent c50e6e4 commit c01aa64

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

clippy_lints/src/utils/conf.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ impl TryConf {
3131
}
3232
}
3333

34-
/// Note that the configuration parsing currently doesn't support documentation that will
35-
/// that spans over several lines. This will be possible with the new implementation
36-
/// See (rust-clippy#7172)
3734
macro_rules! define_Conf {
3835
($(
3936
$(#[doc = $doc:literal])+
@@ -130,7 +127,6 @@ macro_rules! define_Conf {
130127
};
131128
}
132129

133-
// N.B., this macro is parsed by util/lintlib.py
134130
define_Conf! {
135131
/// Lint: ENUM_VARIANT_NAMES, LARGE_TYPES_PASSED_BY_VALUE, TRIVIALLY_COPY_PASS_BY_REF, UNNECESSARY_WRAPS, UPPER_CASE_ACRONYMS, WRONG_SELF_CONVENTION, BOX_VEC, REDUNDANT_ALLOCATION, RC_BUFFER, VEC_BOX, OPTION_OPTION, LINKEDLIST, RC_MUTEX.
136132
///

clippy_lints/src/utils/internal_lints/metadata_collector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ This lint has the following configuration variables:
8282
/// `default`
8383
macro_rules! CONFIGURATION_VALUE_TEMPLATE {
8484
() => {
85-
"* {name}: `{ty}`: {doc} (defaults to `{default}`)\n"
85+
"* `{name}`: `{ty}`: {doc} (defaults to `{default}`)\n"
8686
};
8787
}
8888

doc/adding_lints.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -559,11 +559,12 @@ in the following steps:
559559
1. Adding a new configuration entry to [clippy_utils::conf](/clippy_utils/src/conf.rs)
560560
like this:
561561
```rust
562-
/// Lint: LINT_NAME. <The configuration field doc comment>
562+
/// Lint: LINT_NAME.
563+
///
564+
/// <The configuration field doc comment>
563565
(configuration_ident: Type = DefaultValue),
564566
```
565-
The configuration value and identifier should usually be the same. The doc comment will be
566-
automatically added to the lint documentation.
567+
The doc comment will be automatically added to the lint documentation.
567568
2. Adding the configuration value to the lint impl struct:
568569
1. This first requires the definition of a lint impl struct. Lint impl structs are usually
569570
generated with the `declare_lint_pass!` macro. This struct needs to be defined manually

0 commit comments

Comments
 (0)