Unbalanced tick marks lead to confusing/inverted error messages from clippy::doc-markdown #6753
Labels
C-bug
Category: Clippy is not doing the correct thing
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
L-suggestion
Lint: Improving, adding or fixing lint suggestions
The title of the issue spoils the fun a bit, but I'll lead with the confusing error message a teammate ran into yesterday:
The doc comment that produces these odd warnings:
unbalanced_tick
on the first line is missing its closing tick mark, which causes the "tick-mark-ness" of the remainder of the comment to be inverted. So technically all of the warnings are correct:encompassed_by
is not inside tick marks (because the tick mark that appears to be at the beginning ofencompassed_by
is actually closing the tick mark from the first line, and the tick mark that appears to be at the ending ofencompassed_by
is actually opening a new tick mark section). However, they're very confusing! :)The text was updated successfully, but these errors were encountered: