From 7a7cbe67512c83ec68a2a7eea3ed5e4fd584e46c Mon Sep 17 00:00:00 2001 From: Sigurd Meldgaard Date: Tue, 27 Aug 2024 11:59:11 +0200 Subject: [PATCH] Fix violations of comment_references lint (#4348) --- analysis_options.yaml | 1 - lib/src/authentication/client.dart | 2 +- lib/src/command/add.dart | 16 +++++----- lib/src/command/outdated.dart | 6 ++-- lib/src/dart.dart | 5 ++- lib/src/entrypoint.dart | 19 ++++++----- lib/src/executable.dart | 16 +++++----- lib/src/global_packages.dart | 14 ++++----- lib/src/http.dart | 4 +-- lib/src/ignore.dart | 35 +++++++++++---------- lib/src/io.dart | 6 ++-- lib/src/log.dart | 2 -- lib/src/oauth2.dart | 2 +- lib/src/progress.dart | 4 +-- lib/src/pubspec.dart | 8 ++--- lib/src/pubspec_utils.dart | 4 +-- lib/src/rate_limited_scheduler.dart | 2 +- lib/src/solver/package_lister.dart | 2 +- lib/src/solver/partial_solution.dart | 4 +-- lib/src/solver/report.dart | 3 +- lib/src/solver/version_solver.dart | 9 +++--- lib/src/source.dart | 13 ++++---- lib/src/source/cached.dart | 13 ++++---- lib/src/source/git.dart | 6 ++-- lib/src/source/hosted.dart | 13 +++----- lib/src/system_cache.dart | 5 --- test/descriptor.dart | 12 +++---- test/descriptor/tar.dart | 2 +- test/embedding/ensure_pubspec_resolved.dart | 4 --- test/package_server.dart | 3 +- test/test_pub.dart | 4 +-- tool/extract_all_pub_dev.dart | 2 +- 32 files changed, 107 insertions(+), 134 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index c1d8ab7a9..c820ffe47 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -3,7 +3,6 @@ include: package:dart_flutter_team_lints/analysis_options.yaml analyzer: errors: lines_longer_than_80_chars: ignore # TODO(mosum): fix the offending lines - comment_references: ignore # TODO(mosum): fix the offending lines todo: ignore exclude: - lib/src/third_party/** diff --git a/lib/src/authentication/client.dart b/lib/src/authentication/client.dart index 412e3f436..2b4e83534 100644 --- a/lib/src/authentication/client.dart +++ b/lib/src/authentication/client.dart @@ -17,7 +17,7 @@ import 'credential.dart'; /// This client authenticates requests by injecting `Authentication` header to /// requests. /// -/// Requests to URLs not under [serverBaseUrl] will not be authenticated. +/// Requests to URLs not under [_credential]'s url will not be authenticated. class _AuthenticatedClient extends http.BaseClient { /// Constructs Http client wrapper that injects `authorization` header to /// requests and handles authentication errors. diff --git a/lib/src/command/add.dart b/lib/src/command/add.dart index 6199c5fd1..87ac45b6d 100644 --- a/lib/src/command/add.dart +++ b/lib/src/command/add.dart @@ -369,8 +369,8 @@ Specify multiple sdk packages with descriptors.'''); r'(?::(?.*))?$', ); - /// Split [arg] on ':' and interpret it with the flags in [argResult] either as - /// an old-style or a new-style descriptor to produce a PackageRef]. + /// Split [arg] on ':' and interpret it with the flags in [argResults] either + /// as an old-style or a new-style descriptor to produce a PackageRef]. _ParseResult _parsePackage(String arg, ArgResults argResults) { var isDev = argResults.flag('dev'); var isOverride = false; @@ -557,9 +557,9 @@ Specify multiple sdk packages with descriptors.'''); return _PartialParseResult(ref, constraint); } - /// Parse [package] to return the corresponding [_ParseResult]. + /// Parse [packageName] to return the corresponding [_ParseResult]. /// - /// [package] must be written in the format + /// [packageName] must be written in the format /// `[:descriptor>]`, where quotations should be used if /// necessary. /// @@ -589,16 +589,16 @@ Specify multiple sdk packages with descriptors.'''); /// non-string descriptor. /// /// If a version constraint is provided when the `--path` or any of the - /// `--git-