Skip to content

Commit f394f26

Browse files
authored
Fix unintended_html_in_doc_comment lints (#3734)
There are a few that are false positives, collection types with specified generics in square braces (`[List<int>]`) work in dartdoc, but it's slightly better style for these cases to not over-link to core types. Refer to collection types in prose, and use backticks where describing but not linking to a type is appropriate. Reformat a code block to use 4 space indent and a blank following the prose block to use the intended markdown syntax. Rephrase a few updated docs for readability.
1 parent ec64e84 commit f394f26

File tree

7 files changed

+16
-12
lines changed

7 files changed

+16
-12
lines changed

build_config/lib/src/builder_definition.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ class PostProcessBuilderDefinition {
155155
/// A unique key for this Builder in `'$package:$builder'` format.
156156
String get key => builderKeyExpando[this]!;
157157

158-
/// The name of the top-level method in [import] from
159-
/// Map<String, dynamic> -> Builder.
158+
/// The name of the top-level method in [import] which takes a
159+
/// `Map<String, dynamic>` and returns a `Builder`.
160160
@JsonKey(required: true, disallowNullValue: true)
161161
final String builderFactory;
162162

build_daemon/lib/data/build_target.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,11 @@ abstract class OutputLocation
7575
/// path.
7676
///
7777
/// For example hoisting the build target web:
78-
/// <web>/<web-contents>
78+
///
79+
/// <web>/<web-contents>
80+
///
7981
/// Should result in:
80-
/// <output-folder>/<web-contents>
82+
///
83+
/// <output-folder>/<web-contents>
8184
bool get hoist;
8285
}

build_modules/lib/src/kernel_builder.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ class KernelBuilder implements Builder {
6767
/// Optional. When omitted the [platform] name is used.
6868
final String kernelTargetName;
6969

70-
/// Experiments to pass to kernel (as --enable-experiment=<experiment> args).
70+
/// Experiments to pass to kernel (as `--enable-experiment=<experiment>`
71+
/// args).
7172
final Iterable<String> experiments;
7273

7374
KernelBuilder({

build_runner_core/lib/src/asset/file_based.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ File _fileFor(AssetId id, PackageGraph packageGraph) {
123123
return File(_filePathFor(id, packageGraph));
124124
}
125125

126-
/// Returns a [Future<File>] for [id] given [packageGraph].
126+
/// Returns a `File` for the asset reference by [id] given [packageGraph].
127127
///
128128
/// Throws an `AssetNotFoundException` if it doesn't exist.
129129
Future<File> _fileForOrThrow(AssetId id, PackageGraph packageGraph) {

build_runner_core/lib/src/asset_graph/graph.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ class AssetGraph {
175175
/// Removes the node representing [id] from the graph, and all of its
176176
/// `primaryOutput`s.
177177
///
178-
/// Also removes all edges between all removed nodes and other nodes.
178+
/// Also removes all edges between all removed nodes and remaining nodes.
179179
///
180-
/// Returns a [Set<AssetId>] of all removed nodes.
180+
/// Returns the IDs of removed asset nodes.
181181
Set<AssetId> _removeRecursive(AssetId id, {Set<AssetId>? removedIds}) {
182182
removedIds ??= <AssetId>{};
183183
var node = get(id);

build_runner_core/lib/src/generate/build_impl.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ class _SingleBuild {
331331
String _buildProgress() =>
332332
'$actionsCompletedCount/$actionsStartedCount actions completed.';
333333

334-
/// Runs the actions in [_buildPhases] and returns a [Future<BuildResult>]
335-
/// which completes once all [BuildPhase]s are done.
334+
/// Runs the actions in [_buildPhases] and returns a future which completes
335+
/// to the [BuildResult] once all [BuildPhase]s are done.
336336
Future<BuildResult> _runPhases() {
337337
return _performanceTracker.track(() async {
338338
final outputs = <AssetId>[];

build_test/lib/src/in_memory_reader.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class InMemoryAssetReader extends AssetReader
2222

2323
/// Create a new asset reader that contains [sourceAssets].
2424
///
25-
/// Any items in [sourceAssets] which are [String]s will be converted into
26-
/// a [List<int>] of bytes.
25+
/// Any strings in [sourceAssets] will be converted into a `List<int>` of
26+
/// bytes.
2727
///
2828
/// May optionally define a [rootPackage], which is required for some APIs.
2929
InMemoryAssetReader({Map<AssetId, dynamic>? sourceAssets, this.rootPackage})

0 commit comments

Comments
 (0)