-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Warning on comment references for Dart keywords #60794
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
If dartdoc isn't going to support these then it makes sense for us to let users know. We already have |
I think these are all reported by the |
They are reported as if the keywords don't exist in scope. I'd prefer the |
Ah I see. I think we can just add an additional LintCode then to the comment_references AnalysisRule. The LintCode is what controls the messaging. |
Interesting. It appears that almost nobody has that lint enabled. I don't know whether that's because nobody cares about this or whether nobody knows the lint exists. If it's the former then we don't really need to do anything about this. If it's the latter then we should consider whether a warning would be more appropriate. |
I'd love to convert it to a warning. But I'm pretty sure there will always be false positives until we can use a real markdown parser in the rule. I don't have any examples offhand. But a real markdown parser can handle escaped characters like |
I only got the knowledge of this lint recently, so I suspect the latter. I would even argue that it should probably be on effective Dart now that we have doc imports, but I guess we could wait until the fixes produce the right import kind at least. |
From @bwilkerson's #47444 (comment):
From @srawlins' #47444 (comment):
Maybe we could think of other cases like this, but at least for
this
,super
,false
,true
,null
, etc, we could probably create a warning to suggest the user to stop using[]
and to prefer backsticks.The text was updated successfully, but these errors were encountered: