Skip to content

Commit 998cd10

Browse files
srawlinsCommit Queue
authored andcommitted
analyzer: Correct comment references in some source files
This corrects about 40 of 220 comment_references issues in the analyzer package. In correcting the `experimentStatusToStringList` function, I see that it is unused. Change-Id: I0c2ec602262121337e7305797596fac9df987973 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392243 Reviewed-by: Brian Wilkerson <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent 437bcb8 commit 998cd10

File tree

16 files changed

+42
-47
lines changed

16 files changed

+42
-47
lines changed

pkg/analyzer/lib/dart/analysis/utilities.dart

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

5+
/// @docImport 'package:analyzer/dart/analysis/session.dart';
6+
library;
7+
58
import 'package:analyzer/dart/analysis/analysis_context.dart';
69
import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
710
import 'package:analyzer/dart/analysis/features.dart';

pkg/analyzer/lib/dart/element/element.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ abstract class AugmentedInstanceElement {
116116

117117
/// The fields declared in this element.
118118
///
119-
/// [FieldAugmentationElement]s replace corresponding elements, other
119+
/// `FieldAugmentationElement`s replace corresponding elements, other
120120
/// [FieldElement]s are appended.
121121
List<FieldElement> get fields;
122122

@@ -131,7 +131,7 @@ abstract class AugmentedInstanceElement {
131131

132132
/// The methods declared in this element.
133133
///
134-
/// [MethodAugmentationElement]s replace corresponding elements, other
134+
/// `MethodAugmentationElement`s replace corresponding elements, other
135135
/// [MethodElement]s are appended.
136136
List<MethodElement> get methods;
137137

@@ -190,7 +190,7 @@ abstract class AugmentedInstanceElement {
190190
abstract class AugmentedInterfaceElement implements AugmentedInstanceElement {
191191
/// The constructors declared in this element.
192192
///
193-
/// [ConstructorAugmentationElement]s replace corresponding elements,
193+
/// `ConstructorAugmentationElement`s replace corresponding elements,
194194
/// other [ConstructorElement]s are appended.
195195
List<ConstructorElement> get constructors;
196196

pkg/analyzer/lib/dart/element/element2.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
/// statements declares a local variable then the local variable will be
4343
/// represented by an element.
4444
///
45+
/// @docImport 'package:analyzer/dart/element/element.dart';
4546
/// @docImport 'package:analyzer/src/dart/element/member.dart';
4647
library;
4748

@@ -1171,7 +1172,7 @@ abstract class InterfaceFragment implements InstanceFragment {
11711172
///
11721173
/// Clients may not extend, implement or mix-in this class.
11731174
abstract class JoinPatternVariableElement2 implements PatternVariableElement2 {
1174-
/// Whether the [variables] are consistent, present in all branches,
1175+
/// Whether the [variables2] are consistent, present in all branches,
11751176
/// and have the same type and finality.
11761177
bool get isConsistent;
11771178

pkg/analyzer/lib/dart/element/visitor2.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ class GeneralizingElementVisitor2<R> implements ElementVisitor2<R> {
187187

188188
/// A visitor that will recursively visit all of the element in an element
189189
/// model. For example, using an instance of this class to visit a
190-
/// [CompilationUnitElement] will also cause all of the types in the compilation
191-
/// unit to be visited.
190+
/// [LibraryFragment] will also cause all of the types in the fragment to be
191+
/// visited.
192192
///
193193
/// Subclasses that override a visit method must either invoke the overridden
194194
/// visit method or must explicitly ask the visited element to visit its

pkg/analyzer/lib/error/listener.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ class ErrorReporter {
5858
@internal
5959
int lockLevel = 0;
6060

61-
/// Initialize a newly created error reporter that will report errors to the
62-
/// given [_errorListener]. Errors will be reported against the
63-
/// [_defaultSource] unless another source is provided later.
61+
/// Initializes a newly created error reporter that will report errors to the
62+
/// given [_errorListener].
63+
///
64+
/// Errors will be reported against the [_source] unless another source is
65+
/// provided later.
6466
ErrorReporter(this._errorListener, this._source);
6567

6668
Source get source => _source;

pkg/analyzer/lib/file_system/memory_file_system.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ class MemoryResourceProvider implements ResourceProvider {
5050
@override
5151
pathos.Context get pathContext => _pathContext;
5252

53-
/// Convert the given posix [path] to conform to this provider's path context.
53+
/// Converts the given posix [filePath] to conform to this provider's path
54+
/// context.
5455
///
5556
/// This is a utility method for testing; paths passed in to other methods in
5657
/// this class are never converted automatically.
@@ -605,7 +606,7 @@ abstract class _MemoryResource implements Resource {
605606
/// Watch for changes to the files inside this folder (and in any nested
606607
/// folders, including folders reachable via links).
607608
///
608-
/// If [provider.delayWatcherInitialization] is not `null`, this method will
609+
/// If `provider.delayWatcherInitialization` is not `null`, this method will
609610
/// wait for this amount of time before it starts capturing/streaming events
610611
/// to simulate the delay that occurs when initializing a real file system
611612
/// watcher.

pkg/analyzer/lib/file_system/overlay_file_system.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class OverlayResourceProvider implements ResourceProvider {
110110
}
111111

112112
/// Return the paths of all of the overlaid files that are children of the
113-
/// given [folder], either directly or indirectly.
113+
/// given [folderPath], either directly or indirectly.
114114
Iterable<String> _overlaysInFolder(String folderPath) => _overlays.keys
115115
.where((filePath) => pathContext.isWithin(folderPath, filePath));
116116
}

pkg/analyzer/lib/source/file_source.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ class FileSource extends Source {
4545

4646
/// Get and return the contents and timestamp of the underlying file.
4747
///
48-
/// Clients should consider using the method [AnalysisContext.getContents]
49-
/// because contexts can have local overrides of the content of a source that
50-
/// the source is not aware of.
48+
/// Clients should consider using the method
49+
/// `AnalysisSession.getFile('...').contents` because contexts can have local
50+
/// overrides of the content of a source that the source is not aware of.
5151
///
5252
/// Throws an exception if the contents of this source could not be accessed.
5353
/// See [contents].

pkg/analyzer/lib/source/source.dart

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,9 @@ abstract class Source {
7171

7272
/// Return `true` if this source exists.
7373
///
74-
/// Clients should consider using the method [AnalysisContext.exists] because
75-
/// contexts can have local overrides of the content of a source that the
76-
/// source is not aware of and a source with local content is considered to
77-
/// exist even if there is no file on disk.
78-
///
79-
/// @return `true` if this source exists
74+
/// Clients should consider using the method `AnalysisSession.getFile` (and
75+
/// checking for an invalid result) because contexts can have local overrides
76+
/// of the content of a source that the source is not aware of and a source
77+
/// with local content is considered to exist even if there is no file on disk.
8078
bool exists();
8179
}

pkg/analyzer/lib/src/dart/analysis/analysis_options_map.dart

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

5+
/// @docImport 'package:analyzer/dart/analysis/analysis_options.dart';
6+
library;
7+
58
import 'package:analyzer/file_system/file_system.dart';
69
import 'package:analyzer/src/dart/analysis/analysis_options.dart';
710

0 commit comments

Comments
 (0)