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:
@@ -62,7 +62,7 @@ public static class S7TagDefinitionFactory
|
||||
return false;
|
||||
var address = addrEl.GetString();
|
||||
if (string.IsNullOrWhiteSpace(address)) return false;
|
||||
// Strict enum read (R2-11 Phase C): a typo'd dataType rejects the tag (→ BadNodeIdUnknown)
|
||||
// Strict enum read: a typo'd dataType rejects the tag (→ BadNodeIdUnknown)
|
||||
// instead of silently defaulting to a wrong-width Good.
|
||||
if (!TagConfigJson.TryReadEnumStrict(root, "dataType", S7DataType.Int16, out var dataType)) return false;
|
||||
var stringLength = ReadInt(root, "stringLength");
|
||||
@@ -76,7 +76,7 @@ public static class S7TagDefinitionFactory
|
||||
// ValueRank/ArrayDimensions. Absent / isArray=false ⇒ null (scalar).
|
||||
var arrayCount = ReadArrayCount(root);
|
||||
// "writable" defaults to true when absent (today's value); node-level authz still governs
|
||||
// writes. Honouring the key makes read-only equipment tags authorable (UNDER-6).
|
||||
// writes. Honouring the key makes read-only equipment tags authorable.
|
||||
var writable = TagConfigJson.ReadWritable(root);
|
||||
def = new S7TagDefinition(
|
||||
Name: rawPath,
|
||||
@@ -126,7 +126,7 @@ public static class S7TagDefinitionFactory
|
||||
|
||||
/// <summary>
|
||||
/// The <c>TagConfig</c> key carrying the S7 data type. Shared with the AdminUI authoring model so
|
||||
/// "does the blob declare a type?" is asked of one spelling, not two (Gitea #551).
|
||||
/// "does the blob declare a type?" is asked of one spelling, not two.
|
||||
/// </summary>
|
||||
public const string DataTypeKey = "dataType";
|
||||
|
||||
@@ -143,7 +143,7 @@ public static class S7TagDefinitionFactory
|
||||
/// S7 is the one driver in the fleet whose reader <b>requires the key to be present</b>
|
||||
/// (<see cref="FromTagConfig"/> refuses a blob without it, where every sibling falls back to a
|
||||
/// default), so a hand-authored / CSV / API blob that omits it used to pass both gates and die
|
||||
/// at the driver with <c>BadNodeIdUnknown</c> — Gitea #551 item 2.
|
||||
/// at the driver with <c>BadNodeIdUnknown</c>.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// Presence is judged on the KEY, not on the value: a non-string token
|
||||
@@ -158,16 +158,16 @@ public static class S7TagDefinitionFactory
|
||||
public static bool DeclaresDataType(JsonElement root) => root.TryGetProperty(DataTypeKey, out _);
|
||||
|
||||
/// <summary>
|
||||
/// Deploy-time inspection (05/CONV-2): warns for a blob <see cref="FromTagConfig"/> would
|
||||
/// Deploy-time inspection: warns for a blob <see cref="FromTagConfig"/> would
|
||||
/// <b>reject</b> — a structurally unparseable or non-object document, an absent / non-string /
|
||||
/// blank <c>address</c>, an <b>absent</b> <c>dataType</c> (see <see cref="DeclaresDataType"/>), a
|
||||
/// present-but-invalid <c>dataType</c> (the runtime enum read is STRICT since R2-11 Phase C, so a
|
||||
/// present-but-invalid <c>dataType</c> (the runtime enum read is STRICT, so a
|
||||
/// typo rejects the tag), or an out-of-range <c>stringLength</c> on a <c>String</c> tag. Such a tag
|
||||
/// is skipped by the driver and reads <c>BadNodeIdUnknown</c> forever. Empty when the mapper accepts
|
||||
/// the blob, when it is blank, or when it is not an equipment-tag object. Never throws.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>The verdict comes from <see cref="FromTagConfig"/>, not from a mirror</b> (Gitea #551) — see
|
||||
/// <b>The verdict comes from <see cref="FromTagConfig"/>, not from a mirror</b> — see
|
||||
/// <c>ModbusTagDefinitionFactory.Inspect</c>'s remarks for the full argument.
|
||||
/// </remarks>
|
||||
/// <param name="reference">The equipment tag's TagConfig JSON.</param>
|
||||
@@ -175,7 +175,7 @@ public static class S7TagDefinitionFactory
|
||||
public static IReadOnlyList<string> Inspect(string reference)
|
||||
{
|
||||
var warnings = new List<string>();
|
||||
// Gitea #556 item 1: the framing check TRIMS FIRST. FromTagConfig hands the blob straight to
|
||||
// The framing check TRIMS FIRST. FromTagConfig hands the blob straight to
|
||||
// JsonDocument.Parse, which tolerates leading whitespace — so an untrimmed check let " {…}" be
|
||||
// read (and possibly REFUSED) by the driver while drawing zero deploy warnings. A reference that
|
||||
// still does not start with '{' after trimming is not an equipment-tag TagConfig at all and keeps
|
||||
|
||||
Reference in New Issue
Block a user