Skip to content

[various] Add unintended_html_in_doc_comment to analysis options#11303

Open
stuartmorgan-g wants to merge 6 commits intoflutter:mainfrom
stuartmorgan-g:unintended-html-analysis
Open

[various] Add unintended_html_in_doc_comment to analysis options#11303
stuartmorgan-g wants to merge 6 commits intoflutter:mainfrom
stuartmorgan-g:unintended-html-analysis

Conversation

@stuartmorgan-g
Copy link
Collaborator

Adds unintended_html_in_doc_comment to our analysis options, and fixes violations.

This does a version bump even for cases where the comments being fixed are internal, because part of the goal here is to eliminate pana deductions on pub.dev, and that doesn't take into account whether the violation is client-facing or just package-developer-facing.

Fixes flutter/flutter#183860

Pre-Review Checklist

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

import 'package:camera_web/src/types/types.dart';
import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
// TODO(srujzs): This is exported in `package:web` 0.6.0. Remove this when it is available.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was just opportunistic cleanup to a test file I was already editing, since I happened to notice it. We already require package:web 1.0+ for example.

Copy link

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

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 introduces the unintended_html_in_doc_comment lint rule to the analysis options and addresses violations across several packages. The changes primarily involve replacing HTML-like tags in Dart doc comments with markdown code blocks (e.g., changing <T> to <T> or adding ```dart blocks for code examples). This is a valuable improvement for documentation clarity and consistency, aligning with best practices for Dartdoc. Version numbers in pubspec.yaml and `CHANGELOG.md` files have been updated accordingly for the affected packages.

@stuartmorgan-g stuartmorgan-g added CICD Run CI/CD and removed CICD Run CI/CD labels Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[packages] Enable unintended_html_in_doc_comment

2 participants