Skip to content

Commit 29e68a9

Browse files
szakariasgemini-code-assist[bot]
authored andcommitted
Fix unresolved doc comment references in dev/ tooling (flutter#193501)
Fixes doc comment references in `dev/bots`, `dev/devicelab`, `dev/snippets`, `dev/tools`, and `dev/packages_autoroller` that don't resolve in Dart scope. Two comments had inaccurate content, which is also corrected: - `interpolateSkeleton` (`dev/snippets`): the comment said the `id` is only substituted for application samples. The `id` is always substituted; it's the `serial` and `app` that depend on the sample type. - `update_engine_version_test.dart` (`dev/tools`): the comment listed `bin/internal/engine.version` as a file written by `update_engine_version.sh`. The script writes `bin/cache/engine.stamp` and `bin/cache/engine.realm`. Towards flutter#192870 — enabling the `comment_references` lint. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 227bc83 commit 29e68a9

28 files changed

Lines changed: 52 additions & 50 deletions

‎dev/bots/analyze_snippet_code.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ class _SnippetChecker {
543543

544544
List<_Line>? _headersWithImports;
545545

546-
/// Checks all the snippets in the Dart files in [_flutterPackage] for errors.
546+
/// Checks all the snippets in the Dart files in [_flutterPackages] for errors.
547547
/// Returns true if any errors are found, false otherwise.
548548
Future<bool> checkSnippets() async {
549549
final snippets = <String, _SnippetFile>{};
@@ -1169,7 +1169,7 @@ class _SnippetChecker {
11691169
return errors;
11701170
}
11711171

1172-
/// Invokes the analyzer on the given [directory] and returns the stdout (with some lines filtered).
1172+
/// Invokes the analyzer on the given `directory` and returns the stdout (with some lines filtered).
11731173
List<String> _runAnalyzer() {
11741174
_createConfigurationFiles();
11751175
// Run pub get to avoid output from getting dependencies in the analyzer

‎dev/bots/check_examples_cross_imports.dart‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ void main(List<String> args) {
8787
/// Checks the examples in `examples/**` libraries for cross imports.
8888
///
8989
/// Excludes known examples that contain cross imports, i.e.
90-
/// [ExamplesCrossImportChecker.knownExamplesFlutterViewCrossImports] and
91-
/// [ExamplesCrossImportChecker.knownExamplesImageListCrossImports].
90+
/// [ExamplesCrossImportChecker.knownExamplesCrossImports].
9291
///
9392
/// No examples should import Material or Cupertino.
9493
/// Any Material or Cupertino specific examples should go in

‎dev/bots/post_process_docs.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Future<String> gitRevision({
8686
}
8787

8888
/// Wrapper function to run a subprocess checking exit code and printing stderr and stdout.
89-
/// [executable] is a string with the script/binary to execute, [args] is the list of flags/arguments
89+
/// [command] is the script/binary to execute followed by its flags/arguments,
9090
/// and [workingDirectory] is as string to the working directory where the subprocess will be run.
9191
Future<void> runProcessWithValidations(
9292
List<String> command,
@@ -140,7 +140,7 @@ Future<String> getBranchName({
140140
}
141141

142142
/// Updates the footer of the api documentation with the correct branch and versions.
143-
/// [footerPath] is the path to the location of the footer js file and [version] is a
143+
/// [footerFile] is the footer js file and [version] is a
144144
/// string with the version calculated by the flutter tool.
145145
Future<void> createFooter(
146146
File footerFile,

‎dev/bots/run_command.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class CommandResult {
7979
/// running process.
8080
///
8181
/// `outputListener` is called for every line of standard output from the
82-
/// process, and is given the [Process] object. This can be used to interrupt
82+
/// process, and is given the [io.Process] object. This can be used to interrupt
8383
/// an indefinitely running process, for example, by waiting until the process
8484
/// emits certain output.
8585
///
@@ -227,7 +227,7 @@ String? _discoverBestNdkPath() {
227227
/// false, calls foundError (which does not terminate execution!).
228228
///
229229
/// `outputListener` is called for every line of standard output from the
230-
/// process, and is given the [Process] object. This can be used to interrupt
230+
/// process, and is given the [io.Process] object. This can be used to interrupt
231231
/// an indefinitely running process, for example, by waiting until the process
232232
/// emits certain output.
233233
///

‎dev/bots/suite_runners/run_flutter_packages_tests.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Future<void> flutterPackagesRunner() async {
6565
///
6666
/// The `filesystem` parameter specified filesystem to read the packages version file from.
6767
/// The `packagesVersionFile` parameter allows specifying an alternative path for the
68-
/// packages version file, when null [flutterPackagesVersionFile] is used.
68+
/// packages version file, when null `flutterPackagesVersionFile` is used.
6969
Future<String> getFlutterPackagesVersion({
7070
fs.FileSystem fileSystem = const LocalFileSystem(),
7171
String? packagesVersionFile,

‎dev/bots/test/analyze-snippet-code-test-input/known_broken_documentation.dart‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/// 1.0, the blabla is blabla blabla blabla an blabla blabla.
2424
///
2525
/// {@tool snippet}
26-
/// Bla blabla blabla some [Text] when the `_blabla` blabla blabla is true, and
26+
/// Bla blabla blabla some `Text` when the `_blabla` blabla blabla is true, and
2727
/// blabla it when it is blabla:
2828
///
2929
/// ```dart
@@ -35,7 +35,7 @@
3535
/// {@end-tool}
3636
///
3737
/// {@tool snippet}
38-
/// Bla blabla blabla some [Text] when the `_blabla` blabla blabla is true, and
38+
/// Bla blabla blabla some `Text` when the `_blabla` blabla blabla is true, and
3939
/// blabla it when it is blabla:
4040
///
4141
/// ```dart
@@ -55,7 +55,7 @@
5555
/// {@end-tool}
5656
///
5757
/// {@tool snippet}
58-
/// Bla blabla blabla some [Text] when the `_blabla` blabla blabla is true, and
58+
/// Bla blabla blabla some `Text` when the `_blabla` blabla blabla is true, and
5959
/// blabla finale blabla:
6060
///
6161
/// ```dart

‎dev/bots/test/analyze-test-input/root/packages/foo/golden_doc.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/// Should not be tag-enforced, no analysis failures should be found.
88
///
99
/// {@tool snippet}
10-
/// Sample invocations of [matchesGoldenFile].
10+
/// Sample invocations of `matchesGoldenFile`.
1111
///
1212
/// ```dart
1313
/// await expectLater(

‎dev/bots/utils.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ final List<String> flutterTestArgs = <String>[];
8282

8383
/// Whether execution should be simulated for debugging purposes.
8484
///
85-
/// When `true`, calls to [runCommand] print to [io.stdout] instead of running
85+
/// When `true`, calls to [runCommand] print to [stdout] instead of running
8686
/// the process. This is useful for determining what an invocation of `test.dart`
8787
/// _might_ due if not invoked with `--dry-run`, or otherwise determine what the
8888
/// different test shards and sub-shards are configured as.

‎dev/devicelab/lib/framework/android_manifest_utils.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import 'package:path/path.dart' as path;
88
import 'package:xml/xml.dart';
99

1010
/// Adds [keyPairs] to the metadata of the Flutter Android app's manifest
11-
/// specified at [testDirectory].
11+
/// specified at [projectDirectory].
1212
///
1313
/// If any one key in [keyPairs] is already in the manifest, then its value
1414
/// is overriden with the value specified in [keyPairs].
1515
///
16-
/// [testDirectory] is assumed to point to the root of the Flutter project.
16+
/// [projectDirectory] is assumed to point to the root of the Flutter project.
1717
void addMetadataToManifest(String projectDirectory, List<(String, String)> keyPairs) {
1818
final String manifestPath = path.join(
1919
projectDirectory,

‎dev/devicelab/lib/framework/apk_utils.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ Future<ProcessResult> _resultOfGradleTask({
487487
);
488488
}
489489

490-
/// Returns [null] if target matches [expectedTarget], otherwise returns an error message.
490+
/// Returns `null` if target matches [expectedTarget], otherwise returns an error message.
491491
String? validateSnapshotDependency(FlutterProject project, String expectedTarget) {
492492
final snapshotBlob = File(
493493
path.join(

0 commit comments

Comments
 (0)