Skip to content

Enable the comment_references lint - #194728

Merged
szakarias merged 1 commit into
flutter:masterfrom
szakarias:enable-comment-references
Oct 20, 2026
Merged

szakarias merged 1 commit into
flutter:masterfrom
szakarias:enable-comment-references

Conversation

@szakarias

Copy link
Copy Markdown
Contributor

Enables the comment_references lint for the framework. All doc comment references outside the engine now resolve in Dart scope. The engine opts out for now.

@flutter-dashboard

Copy link
Copy Markdown

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 both you and the PR author believe this PR qualifies for a test exemption, escalate to the tech lead for the changed area to review and apply the test-exempt label. All reviewers should feel empowered to ask for tests before escalating.

@github-actions github-actions Bot added the engine flutter/engine related. See also e: labels. label Oct 19, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enables the "comment_references" linter rule in analysis_options_common.yaml and disables it in engine/src/flutter/analysis_options.yaml with a TODO comment referencing an issue. No review comments were provided, and there is no additional feedback.

@justinmc justinmc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@szakarias
szakarias added this pull request to the merge queue Oct 20, 2026
Merged via the queue into flutter:master with commit 82e2490 Oct 20, 2026
27 of 28 checks passed
@szakarias
szakarias deleted the enable-comment-references branch October 20, 2026 17:32
victorsanni added a commit to victorsanni/flutter that referenced this pull request Oct 22, 2026
binding.dart imports dart:ui as ui with a show list that has no FlutterView, so [ui.FlutterView.viewId] does not resolve now that the comment_references lint is enabled (flutter#194728). The unprefixed reference resolves through the file's @DocImport 'dart:ui', like the other FlutterView references in it.
suryaKommana2662 pushed a commit to suryaKommana2662/flutter that referenced this pull request Oct 29, 2026
Enables the `comment_references` lint for the framework. All doc comment
references outside the engine now resolve in Dart scope. The engine opts
out for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD engine flutter/engine related. See also e: labels. missing-tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants