Skip to content

Commit ecd8ec8

Browse files
authored
Fix unresolved doc comment references in dev/integration_tests and dev/benchmarks (flutter#193433)
Fixes doc comment references in `dev/integration_tests` and `dev/benchmarks` that don't resolve in Dart scope, mostly by adding doc imports; parameters and locals go in backticks. Towards flutter#192870 — enabling the `comment_references` lint.
1 parent f112a60 commit ecd8ec8

16 files changed

Lines changed: 40 additions & 10 deletions

File tree

‎dev/benchmarks/macrobenchmarks/lib/src/web/bench_text_layout.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class BenchTextCachedLayout extends RawRecorder {
150150
}
151151

152152
/// Global counter incremented every time the benchmark is asked to
153-
/// [createWidget].
153+
/// [BenchBuildColorsGrid.createWidget].
154154
///
155155
/// The purpose of this counter is to make sure the rendered paragraphs on each
156156
/// build are unique.

‎dev/benchmarks/macrobenchmarks/lib/src/web/recorder.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ bool _isMeasuringFrame = false;
12741274
/// [WidgetBuildRecorder] only measures frames that build widgets, and ignores
12751275
/// frames that clear the screen.
12761276
///
1277-
/// Warm-up frames are not measured. If [profile.isWarmingUp] is true,
1277+
/// Warm-up frames are not measured. If [Profile.isWarmingUp] is true,
12781278
/// this function does nothing.
12791279
void startMeasureFrame(Profile profile) {
12801280
if (_calledStartMeasureFrame) {
@@ -1295,7 +1295,7 @@ void startMeasureFrame(Profile profile) {
12951295
/// See [startMeasureFrame] for details on what this instrumentation is used
12961296
/// for.
12971297
///
1298-
/// Warm-up frames are not measured. If [profile.isWarmingUp] was true
1298+
/// Warm-up frames are not measured. If [Profile.isWarmingUp] was true
12991299
/// when the corresponding [startMeasureFrame] was called,
13001300
/// this function does nothing.
13011301
void endMeasureFrame() {

‎dev/benchmarks/macrobenchmarks/lib/web_benchmarks.dart‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
/// @docImport 'dart:html';
6+
library;
7+
58
import 'dart:async';
69
import 'dart:convert' show json;
710
import 'dart:js_interop';
@@ -450,7 +453,7 @@ class LocalBenchmarkServerClient {
450453
);
451454
}
452455

453-
/// This is the same as calling [html.HttpRequest.request] but it doesn't
456+
/// This is the same as calling [HttpRequest.request] but it doesn't
454457
/// crash on 404, which we use to detect `flutter run`.
455458
Future<web.XMLHttpRequest> _requestXhr(
456459
Uri url, {

‎dev/integration_tests/android_hardware_smoke_test/test/widget_test.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ import 'package:image/image.dart' as img;
2222

2323
/// Pre-compiled 1x1 transparent PNG bytes used for mock asset loads and golden comparisons.
2424
///
25-
/// This is used instead of [testImage] (which is a decoded [ui.Image] object) because:
25+
/// This is used instead of `testImage` (which is a decoded [ui.Image] object) because:
2626
/// 1. `compareGoldenOnDevice` and our comparator expect raw compressed [Uint8List] bytes.
2727
/// 2. The mock `'flutter/assets'` binary messenger channel must return raw file bytes.
28-
/// 3. Converting [testImage] to PNG bytes dynamically using `toByteData(format: png)`
28+
/// 3. Converting `testImage` to PNG bytes dynamically using `toByteData(format: png)`
2929
/// is slow and deadlocks inside the test's `FakeAsync` zone.
3030
final Uint8List transparentImageBytes = Uint8List.fromList(
3131
img.encodePng(img.Image(width: 1, height: 1)),

‎dev/integration_tests/android_semantics_testing/lib/src/common.dart‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
/// @docImport 'package:flutter/semantics.dart';
6+
library;
7+
58
// ignore_for_file: avoid_dynamic_calls
69

710
import 'dart:convert';
@@ -148,7 +151,7 @@ class AndroidSemanticsNode {
148151
return Size(rect.bottom - rect.top, rect.right - rect.left);
149152
}
150153

151-
/// Gets a list of [AndroidSemanticsActions] which are defined for the node.
154+
/// Gets a list of [AndroidSemanticsAction]s which are defined for the node.
152155
List<AndroidSemanticsAction> getActions() {
153156
final List<int>? actions = (_values['actions'] as List<dynamic>?)?.cast<int>();
154157
if (actions == null) {

‎dev/integration_tests/android_semantics_testing/lib/src/tests/controls_constants.dart‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
/// @docImport 'package:flutter/foundation.dart';
6+
library;
7+
58
/// The name of the route containing the test suite.
69
const String selectionControlsRoute = 'controls';
710

‎dev/integration_tests/android_semantics_testing/lib/src/tests/headings_constants.dart‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
/// @docImport 'package:flutter/foundation.dart';
6+
library;
7+
58
/// The name of the route containing the test suite.
69
const String headingsRoute = 'headings';
710

‎dev/integration_tests/android_semantics_testing/lib/src/tests/popup_constants.dart‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
/// @docImport 'package:flutter/foundation.dart';
6+
library;
7+
58
/// The name of the route containing the test suite.
69
const String popupControlsRoute = 'popups';
710

‎dev/integration_tests/android_semantics_testing/lib/src/tests/text_field_constants.dart‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
/// @docImport 'package:flutter/foundation.dart';
6+
library;
7+
58
/// The name of the route containing the text field tests.
69
const String textFieldRoute = 'textField';
710

‎dev/integration_tests/android_views/lib/motion_events_page.dart‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
/// @docImport 'package:flutter_driver/flutter_driver.dart';
6+
library;
7+
58
import 'dart:async';
69
import 'dart:io';
710

0 commit comments

Comments
 (0)