-
Notifications
You must be signed in to change notification settings - Fork 1.7k
False positive in unintended_html_in_doc_comment lint #56465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is tricky because The CommonMark interpretation is to treat the [List<int>]: linkTarget declaration somewhere in the file. Then it is a shorthand link. (Which means parsing is not context free.) In either case the If DartDoc replaces remaining Doesn't feel like a slam-dunk, but we probably can recognize Is [foo<upper>2</upper>] valid?
[foo<upper>2</upper>]: https://example.com where you intended to write |
I found an example where this might be the best way to write it. Here its useful to link to the exception since it's novel, and it's useful to include the detail of the generic matching the generic on the method call. I can't find a way like prefer to phrase it where these aren't the same word. |
Wait for the false positives to be resolved. dart-lang/sdk#56465 Referring to an exception with a generic worth specifying for the first time in a doc seems to me to be a valid reason to use this pattern.
Wait for the false positives to be resolved. dart-lang/sdk#56465 Referring to an exception with a generic worth specifying for the first time in a doc seems to me to be a valid reason to use this pattern.
Closing in favor of #59516 |
The lint fires on references to generic classes in square braces.
In
dart doc
this generates valid HTML that links to theList
class. The lint should allow this (even if`List<int>`
with backticks may be better style for these cases).The text was updated successfully, but these errors were encountered: