Add missing @docImport directives for doc comment references - #192734
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
|
This pull request contains changes to Material or Cupertino, which are currently frozen in this repository. Changes should be made in Please refer to #188444 for instructions. |
There was a problem hiding this comment.
Code Review
This pull request adds @docImport directives and library; declarations across multiple Dart files in the Flutter repository to improve documentation. The review feedback recommends separating different types of imports (such as package: imports and relative imports) with empty lines in several files to adhere to the Effective Dart style guide.
15f27a7 to
5e02026
Compare
Follow-up to flutter#192734 and flutter#193087. These are leftovers: four in `packages/flutter/test`, which the earlier PRs didn't cover, and a few one-offs. One fix removes a directive rather than changing a comment: `image_stream.dart` doc imported `dart:ui`, which made `[Image]` point at `dart:ui`'s `Image` rather than the widgets library's `Image`. Nothing needed that doc import: the file's `dart:ui` references are all prefixed, e.g.`[ui.Image]` and resolve through its real import. Towards flutter#192870 — enabling the `comment_references` lint.
…ter#193283) Follow-up to flutter#192734, flutter#193087 and flutter#193216, covering the references inside `lib/src/material` and `lib/src/cupertino`. Doc comment changes only. The changes fall into four kinds: - missing `@docImport` directives - qualified member references, e.g. `[value]` → `[MaterialStatesController.value]` - a constructor parameter in backticks instead of brackets (`liveRegion`) - references to names that do not exist, reworded (`child`, `enabled` in `cupertino/menu_anchor.dart`) Towards flutter#192870 — enabling the `comment_references` lint.
Add doc imports for elements that are not in the lexical scope of the file they appear in. These currently resolve in dartdoc because it maintains a global lookup of everything it has loaded, but the analyzer's
comment_referenceslint reports them.Towards #192870 — enabling the
comment_referenceslint.