You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
support adding import statements for entities reference in comments. #4792
dart-code is very helpful when offering to add a missing import for a class of function.
However, if I reference an entity in a comment dart-code doesn't offer to import the required library.
/// see also: [PanelClipboards]
A lint error is generated:
[{
"resource": "dvault_ui/lib/src/view/clipboard/clipboard_summary_card.dart",
"owner": "_generated_diagnostic_collection_name_#0",
"code": {
"value": "comment_references",
"target": {
"$mid": 1,
"external": "https://dart.dev/lints/comment_references",
"path": "/lints/comment_references",
"scheme": "https",
"authority": "dart.dev"
}
},
"severity": 2,
"message": "The referenced name isn't visible in scope.\nTry adding an import for the referenced name.",
"source": "dart",
"startLineNumber": 11,
"startColumn": 16,
"endLineNumber": 11,
"endColumn": 31
}]
`
To fix this we need a quick fix for `comment_references' that offers to import the required library.
Activity
Enable "Import Library" fix for comment_references lint
DanTup commentedon Oct 17, 2023
I've landed a change in dart-lang/sdk@6489835 which enables that fix for this lint. It'll ship in a future SDK release.
bsutton commentedon Oct 17, 2023