docs: fill missing XML docs and strip tracking IDs from src comments
Clears CommentChecker findings in src/ (3,280 -> 209, the remainder being false positives like PLC-5/IEEE-754/M0.0) by adding missing summaries/params/returns, normalising inheritdoc usage, and removing Gitea/review tracking IDs while keeping the rationale they annotated. Comment-only: comment-stripped sources are identical to the parent commit.
This commit is contained in:
+10
-6
@@ -40,10 +40,9 @@ public readonly record struct MTConnectInferredType(DriverDataType DataType, boo
|
||||
/// <b>Two further call sites this remark used to name do not exist, and should not.</b> The
|
||||
/// universal browser's commit path (<c>RawBrowseCommitMapper</c>) never calls this: it
|
||||
/// FORWARDS the browsed leaf's already-inferred <c>DriverDataType</c> — onto the raw tag's OPC
|
||||
/// UA type, and (since Gitea #560) into the committed <c>TagConfig</c>'s <c>dataType</c> — so
|
||||
/// both come from this rule without re-running it. Before #560 the blob carried the model's
|
||||
/// <c>String</c> default instead and disagreed with the node beside it
|
||||
/// (<c>Driver.MTConnect-003</c>). The AdminUI typed editor (<c>MTConnectTagConfigModel</c>)
|
||||
/// UA type, and into the committed <c>TagConfig</c>'s <c>dataType</c> — so
|
||||
/// both come from this rule without re-running it. Previously the blob carried the model's
|
||||
/// <c>String</c> default instead and disagreed with the node beside it. The AdminUI typed editor (<c>MTConnectTagConfigModel</c>)
|
||||
/// deliberately does not recompute the inference at all — it re-serialises whatever the
|
||||
/// operator picked or the commit stamped.
|
||||
/// </para>
|
||||
@@ -238,7 +237,10 @@ public static class MTConnectDataTypeInference
|
||||
|
||||
private SeparatorInsensitiveComparer() { }
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>Compares two strings ignoring case and separator characters.</summary>
|
||||
/// <param name="x">The first string.</param>
|
||||
/// <param name="y">The second string.</param>
|
||||
/// <returns><see langword="true"/> when both spell the same key.</returns>
|
||||
public bool Equals(string? x, string? y)
|
||||
{
|
||||
if (ReferenceEquals(x, y)) return true;
|
||||
@@ -258,7 +260,9 @@ public static class MTConnectDataTypeInference
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>Hashes a string over exactly the characters <see cref="Equals(string?, string?)"/> compares.</summary>
|
||||
/// <param name="obj">The string to hash.</param>
|
||||
/// <returns>The separator- and case-insensitive hash code.</returns>
|
||||
public int GetHashCode(string obj)
|
||||
{
|
||||
// Must hash exactly the characters Equals compares, or two equal spellings land in
|
||||
|
||||
@@ -89,10 +89,10 @@ public sealed class MTConnectDriverOptions
|
||||
/// that, <see cref="DriverDataType.String"/> — the coercion that cannot fail.
|
||||
/// The <c>/probe</c> step is not reached by a browse-committed tag — the AdminUI's
|
||||
/// commit mapper writes a full typed blob, so the first step always answers — but
|
||||
/// since Gitea #560 the type it writes IS the browsed leaf's inference, so the answer
|
||||
/// the type it writes IS the browsed leaf's inference, so the answer
|
||||
/// is the same one. It previously wrote the model's <c>String</c> default and silently
|
||||
/// mistyped every browsed tag (<c>code-reviews/Driver.MTConnect/findings.md</c>,
|
||||
/// Driver.MTConnect-003). The step still serves a hand-authored / CSV / API blob that
|
||||
/// mistyped every browsed tag (<c>code-reviews/Driver.MTConnect/findings.md</c>).
|
||||
/// The step still serves a hand-authored / CSV / API blob that
|
||||
/// states no type.</item>
|
||||
/// <item>A tag in <see cref="Tags"/> only is reachable by its DataItem <c>id</c>
|
||||
/// (the driver CLI's authoring surface, and every pre-v3 test) and still contributes
|
||||
|
||||
+15
-4
@@ -75,7 +75,7 @@ public static class MTConnectTagDefinitionFactory
|
||||
|
||||
// "driverDataType" (the driver's own tags[] field) or "dataType" (what the AdminUI's typed
|
||||
// MTConnectTagConfigModel writes) — see the DTO remarks. THIS PRECEDENCE IS MIRRORED by that
|
||||
// model's own load (Gitea #550): a non-blank driverDataType out-ranks dataType there too, so the
|
||||
// model's own load: a non-blank driverDataType out-ranks dataType there too, so the
|
||||
// editor displays the type the driver will actually read rather than a key it is overriding.
|
||||
var authoredType = FirstNonBlank(blob.DriverDataType, blob.DataType);
|
||||
if (authoredType is null) return true;
|
||||
@@ -164,8 +164,8 @@ public static class MTConnectTagDefinitionFactory
|
||||
/// It is public for exactly that second caller. The authoring model used to read the type with a
|
||||
/// lenient enum parse that fell back to <c>String</c> on ANY unrecognised value, so a misspelled
|
||||
/// name ("Strng") from a hand-authored blob, a CSV import or the API was accepted at authoring —
|
||||
/// and silently rewritten — while this parse rejected it and the tag died at the driver
|
||||
/// (Gitea #549). A second copy of the rule in the AdminUI would have reopened that gap the
|
||||
/// and silently rewritten — while this parse rejected it and the tag died at the driver.
|
||||
/// A second copy of the rule in the AdminUI would have reopened that gap the
|
||||
/// moment either side moved, so there is one rule and both sides ask it.
|
||||
/// </para>
|
||||
/// <para>
|
||||
@@ -232,7 +232,7 @@ public static class MTConnectTagDefinitionFactory
|
||||
/// and the driver disagree about the type of every tag.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>The alias out-ranks the canonical key, and the editor mirrors that</b> (Gitea #550).
|
||||
/// <b>The alias out-ranks the canonical key, and the editor mirrors that</b>.
|
||||
/// <c>MTConnectTagConfigModel</c> used to read <c>dataType</c> alone, so a blob carrying a
|
||||
/// valid <c>driverDataType</c> was displayed and saved under a type the driver then
|
||||
/// overrode — the editor showed a lie — while an INVALID one sailed through authoring and
|
||||
@@ -248,16 +248,27 @@ public static class MTConnectTagDefinitionFactory
|
||||
/// </remarks>
|
||||
private sealed class MTConnectRawTagConfigDto
|
||||
{
|
||||
/// <summary>The tag's full name as authored.</summary>
|
||||
public string? FullName { get; init; }
|
||||
/// <summary>The MTConnect DataItem id the tag binds to.</summary>
|
||||
public string? DataItemId { get; init; }
|
||||
/// <summary>Alternate spelling of the DataItem address.</summary>
|
||||
public string? Address { get; init; }
|
||||
/// <summary>The coercion type spelling matching the driver's own <c>tags[]</c> field; out-ranks <c>dataType</c>.</summary>
|
||||
public string? DriverDataType { get; init; }
|
||||
/// <summary>The coercion type as the AdminUI editor writes it.</summary>
|
||||
public string? DataType { get; init; }
|
||||
/// <summary>Whether the tag is an array.</summary>
|
||||
public bool? IsArray { get; init; }
|
||||
/// <summary>The array length when <c>IsArray</c> is set.</summary>
|
||||
public int? ArrayDim { get; init; }
|
||||
/// <summary>The MTConnect DataItem category.</summary>
|
||||
public string? MtCategory { get; init; }
|
||||
/// <summary>The MTConnect DataItem type.</summary>
|
||||
public string? MtType { get; init; }
|
||||
/// <summary>The MTConnect DataItem sub-type.</summary>
|
||||
public string? MtSubType { get; init; }
|
||||
/// <summary>The engineering units, when authored.</summary>
|
||||
public string? Units { get; init; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user