Skip to content

Report an undeclared duplicate doc tag once [patch] - #172

Merged
matt-edmondson merged 1 commit into
mainfrom
claude/issue-171-report-duplicate-undeclared-tag-once
Nov 4, 2026
Merged

matt-edmondson merged 1 commit into
mainfrom
claude/issue-171-report-duplicate-undeclared-tag-once

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #171

Summary

DocComment.Validate checked "does not match any declared parameter" for every copy of a tag. Two <param name="y"> entries for an undeclared y got that message twice, three copies got it three times. Its <returns> doc promises one message per problem.

Changes

  • Check now runs the "does not match" test only the first time it sees a name, when documented.Add(name) returns true. Later copies still get "documented more than once". The messages themselves are unchanged.

Tests

  • ValidationReportsADuplicateUndeclaredTagOnce: three y tags against declared x give exactly one "does not match", two "more than once" and one "has no entry".
  • ValidationReportsADuplicateUndeclaredTypeParameterTagOnce: the same case for <typeparam>.
  • Both fail on main and pass with the fix. I checked this by reverting DocComment.cs and running them again.
  • Full suite: 251/251.

Generated by Claude Code

DocComment.Validate ran the "does not match any declared" check for every
copy of a tag, so two <param name="y"> entries for an undeclared y gave
that message twice. Run it only on the first copy and leave the later
copies to the "documented more than once" message.

Fixes #171

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017vfJW5LkA4KtEKYNbjk5tz
@sonarqubecloud

sonarqubecloud Bot commented Nov 3, 2026

Copy link
Copy Markdown

@matt-edmondson
matt-edmondson merged commit c426227 into main Nov 4, 2026
15 checks passed
@matt-edmondson
matt-edmondson deleted the claude/issue-171-report-duplicate-undeclared-tag-once branch November 4, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DocComment.Validate reports "does not match any declared parameter" once per duplicate tag, so one problem becomes several diagnostics

2 participants