Skip to content

Commit

Permalink
Fix unintended_html_in_doc_comment lints
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
natebosch committed Aug 19, 2024
1 parent ec64e84 commit c5d9213
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions build_config/lib/src/builder_definition.dart
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ class PostProcessBuilderDefinition {
/// A unique key for this Builder in `'$package:$builder'` format.
String get key => builderKeyExpando[this]!;

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

Expand Down
7 changes: 5 additions & 2 deletions build_daemon/lib/data/build_target.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@ abstract class OutputLocation
/// path.
///
/// For example hoisting the build target web:
/// <web>/<web-contents>
///
/// <web>/<web-contents>
///
/// Should result in:
/// <output-folder>/<web-contents>
///
/// <output-folder>/<web-contents>
bool get hoist;
}
3 changes: 2 additions & 1 deletion build_modules/lib/src/kernel_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ class KernelBuilder implements Builder {
/// Optional. When omitted the [platform] name is used.
final String kernelTargetName;

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

KernelBuilder({
Expand Down
2 changes: 1 addition & 1 deletion build_runner_core/lib/src/asset/file_based.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ File _fileFor(AssetId id, PackageGraph packageGraph) {
return File(_filePathFor(id, packageGraph));
}

/// Returns a [Future<File>] for [id] given [packageGraph].
/// Returns a `File` for the asset reference by [id] given [packageGraph].
///
/// Throws an `AssetNotFoundException` if it doesn't exist.
Future<File> _fileForOrThrow(AssetId id, PackageGraph packageGraph) {
Expand Down
4 changes: 2 additions & 2 deletions build_runner_core/lib/src/asset_graph/graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ class AssetGraph {
/// Removes the node representing [id] from the graph, and all of its
/// `primaryOutput`s.
///
/// Also removes all edges between all removed nodes and other nodes.
/// Also removes all edges between all removed nodes and remaining nodes.
///
/// Returns a [Set<AssetId>] of all removed nodes.
/// Returns the IDs of removed asset nodes.
Set<AssetId> _removeRecursive(AssetId id, {Set<AssetId>? removedIds}) {
removedIds ??= <AssetId>{};
var node = get(id);
Expand Down
4 changes: 2 additions & 2 deletions build_test/lib/src/in_memory_reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class InMemoryAssetReader extends AssetReader

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

0 comments on commit c5d9213

Please sign in to comment.