Skip to content

Commit 1830689

Browse files
srawlinsCommit Queue
authored andcommitted
DAS: Correct comment references in services/
Change-Id: I4d896e4e917311513a725460f95ca5561bc80ec8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403282 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent 7e94bec commit 1830689

File tree

12 files changed

+26
-24
lines changed

12 files changed

+26
-24
lines changed

pkg/analysis_server/lib/src/legacy_analysis_server.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ class LegacyAnalysisServer extends AnalysisServer {
620620
);
621621
}
622622

623-
/// Handle a [request] that was read from the communication channel.
623+
/// Handle a [requestOrResponse] that was read from the communication channel.
624624
void handleRequestOrResponse(RequestOrResponse requestOrResponse) {
625625
if (requestOrResponse is Request) {
626626
var cancellationToken = CancelableToken();

pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import 'package:analysis_server_plugin/edit/fix/dart_fix_context.dart';
1717
import 'package:analysis_server_plugin/edit/fix/fix.dart';
1818
import 'package:analysis_server_plugin/src/correction/dart_change_workspace.dart';
1919
import 'package:analysis_server_plugin/src/correction/fix_generators.dart';
20-
import 'package:analysis_server_plugin/src/correction/fix_processor.dart';
2120
import 'package:analyzer/dart/analysis/analysis_context.dart';
2221
import 'package:analyzer/dart/analysis/analysis_options.dart';
2322
import 'package:analyzer/dart/analysis/results.dart';
@@ -80,9 +79,10 @@ class BulkFixProcessor {
8079
];
8180

8281
/// A map from an error code to a list of generators used to create multiple
83-
/// correction producers used to build fixes for those diagnostics. The
84-
/// generators used for lint rules are in the
85-
/// [FixProcessor.lintMultiProducerMap].
82+
/// correction producers used to build fixes for those diagnostics.
83+
///
84+
/// The generators used for lint rules are in
85+
/// `_RegisteredFixGenerators.lintMultiProducers`.
8686
///
8787
/// The expectation is that only one of the correction producers will produce
8888
/// a change for a given fix. If more than one change is produced the result

pkg/analysis_server/lib/src/services/correction/dart/add_diagnostic_property_reference.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ class AddDiagnosticPropertyReference extends ResolvedCorrectionProducer {
215215
}
216216
}
217217

218-
/// Fixes all instances of the [LintNames.diagnostic_describe_all_properties] in the given
219-
/// [declaration].
218+
/// Fixes all instances of the [LintNames.diagnostic_describe_all_properties]
219+
/// in the given [declaration].
220220
Future<void> _fixAllDiagnosticPropertyReferences(
221221
ChangeBuilder builder,
222222
ClassDeclaration declaration,
@@ -366,7 +366,8 @@ class AddDiagnosticPropertyReference extends ResolvedCorrectionProducer {
366366
}
367367

368368
/// Returns a list of all the [AnalysisError]s of type
369-
/// [DiagnosticDescribeAllProperties.code] fpr the given [declaration].
369+
/// [LinterLintCode.diagnostic_describe_all_properties] for the given
370+
/// [declaration].
370371
List<AnalysisError> _getAllDiagnosticsInClass(ClassDeclaration declaration) {
371372
var propertyErrors = <AnalysisError>[];
372373
var startOffset = declaration.offset;

pkg/analysis_server/lib/src/services/correction/dart/remove_comparison.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ class RemoveComparison extends ResolvedCorrectionProducer {
188188
}
189189
}
190190

191-
/// Use the [builder] to add an edit to delete the operator and given
192-
/// [operand] from the [binary] expression.
191+
/// Adds an edit with [builder] to delete the operator and [node] from the
192+
/// [binary] expression (where [node] is assumed to be one of the operands).
193193
Future<void> _removeOperatorAndOperand(
194194
ChangeBuilder builder,
195195
BinaryExpression binary,

pkg/analysis_server/lib/src/services/correction/fix/data_driven/transform_set_parser.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ class TransformSetParser {
174174
return _translateTransformSet(node);
175175
}
176176

177-
/// Convert the given [template] into a list of components. Variable
178-
/// references in the template are looked up in the map of [generators].
177+
/// Converts the given [template] into a list of components. Variable
178+
/// references in the template are looked up in [variableScope].
179179
List<TemplateComponent> _extractTemplateComponents(
180180
String template,
181181
VariableScope variableScope,
@@ -301,8 +301,8 @@ class TransformSetParser {
301301
return null;
302302
}
303303

304-
/// Report that the value represented by the [node] does not have the
305-
/// [expectedType], using the [context] to get the key to use in the message.
304+
/// Reports that the value represented by the [node] is not one of the
305+
/// [allowedValues], using the [context] to get the key to use in the message.
306306
Null _reportInvalidValueOneOf(
307307
YamlNode node,
308308
ErrorContext context,

pkg/analysis_server/lib/src/services/correction/fix/pubspec/fix_generator.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,8 @@ class PubspecFixGenerator {
142142
return fixes;
143143
}
144144

145-
/// Add a fix whose edits were built by the [builder] that has the given
146-
/// [kind]. If [args] are provided, they will be used to fill in the message
147-
/// for the fix.
145+
/// Adds a fix whose edits were built by the [builder] that has the given
146+
/// [kind].
148147
void _addFixFromBuilder(ChangeBuilder builder, FixKind kind) {
149148
var change = builder.sourceChange;
150149
if (change.edits.isEmpty) {

pkg/analysis_server/lib/src/services/correction/namespace.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ LibraryImportElement? _getImportElementInfo(SimpleIdentifier prefixNode) {
207207
return _getImportElement(libraryElement, prefix, usedElement);
208208
}
209209

210-
/// Returns the [LibraryImport2] that is referenced by [prefixNode] with a
210+
/// Returns the [LibraryImport] that is referenced by [prefixNode] with a
211211
/// [PrefixElement], maybe `null`.
212212
LibraryImport? _getImportElementInfo2(SimpleIdentifier prefixNode) {
213213
// prepare environment

pkg/analysis_server/lib/src/services/correction/organize_imports.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import 'package:analyzer_plugin/protocol/protocol_common.dart'
1818
import 'package:analyzer_plugin/src/utilities/directive_sort.dart';
1919
import 'package:meta/meta_meta.dart';
2020

21-
/// Organizes imports (and other directives) in the [unit], using sorting
22-
/// rules from [DirectiveSorter].
21+
/// Organizes imports (and other directives) in the [unit].
2322
class ImportOrganizer {
2423
final String initialCode;
2524

pkg/analysis_server/lib/src/services/correction/sort_members.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class MemberSorter {
107107
}
108108
}
109109

110-
/// Sorts all members of the given [classDeclaration].
110+
/// Sorts the [membersToSort].
111111
void _sortClassMembers(List<ClassMember> membersToSort) {
112112
var members = <_MemberInfo>[];
113113
for (var member in membersToSort) {

pkg/analysis_server/lib/src/services/correction/status.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'package:analyzer_plugin/protocol/protocol_common.dart';
77
/// An outcome of a condition checking operation.
88
class RefactoringStatus {
99
/// The current severity of this [RefactoringStatus] - the maximum of the
10-
/// severities of its [entries].
10+
/// severities of its [problems].
1111
RefactoringProblemSeverity? _severity;
1212

1313
/// A list of [RefactoringProblem]s.

0 commit comments

Comments
 (0)