Skip to content

Commit

Permalink
Auto merge of #13586 - evanj:evan.jones/long-paragraph-edit, r=xFrednet
Browse files Browse the repository at this point in the history
docs: Fix too_long_first_doc_paragraph: line -> paragraph

The documentation for too_long_first_doc_paragraph incorrectly says "line" where it should say "paragraph".

Fix a minor typo: doscstring -> docstring.

Also do a few tiny edits to attempt to make the wording slightly shorter and clearer.

changelog: [`too_long_first_doc_paragraph`]: Edit documentation
  • Loading branch information
bors committed Oct 24, 2024
2 parents 6bcd0b9 + 0bcc6f8 commit 9cf416d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clippy_lints/src/doc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,11 @@ declare_clippy_lint! {

declare_clippy_lint! {
/// ### What it does
/// Checks if the first line in the documentation of items listed in module page is too long.
/// Checks if the first paragraph in the documentation of items listed in the module page is too long.
///
/// ### Why is this bad?
/// Documentation will show the first paragraph of the doscstring in the summary page of a
/// module, so having a nice, short summary in the first paragraph is part of writing good docs.
/// Documentation will show the first paragraph of the docstring in the summary page of a
/// module. Having a nice, short summary in the first paragraph is part of writing good docs.
///
/// ### Example
/// ```no_run
Expand All @@ -453,7 +453,7 @@ declare_clippy_lint! {
#[clippy::version = "1.82.0"]
pub TOO_LONG_FIRST_DOC_PARAGRAPH,
nursery,
"ensure that the first line of a documentation paragraph isn't too long"
"ensure the first documentation paragraph is short"
}

declare_clippy_lint! {
Expand Down

0 comments on commit 9cf416d

Please sign in to comment.