Skip to content

Forbid a trailing // after a one-paragraph proto doc comment - #51

Merged
alexander-yevsyukov merged 1 commit into
masterfrom
proto-doc-trailing-comment-line
Oct 28, 2026
Merged

alexander-yevsyukov merged 1 commit into
masterfrom
proto-doc-trailing-comment-line

Conversation

@alexander-yevsyukov

Copy link
Copy Markdown
Contributor

The rule

On 2026-10-28, while reviewing SpineEventEngine/core-jvm#1699, the owner stated the convention
for .proto doc comments:

we do not add an empty line at the end of one-paragraph type description

An empty line is added after a 2nd and further paragraphs.

They removed a trailing // from the one-paragraph doc of LiveEventsPickedUp by hand. No
reviewer or agent could have flagged it, because the shared guidance did not forbid it.

What was wrong

  • guidelines/documentation.md § "Protobuf file headers" named file headers only, and said
    single-paragraph headers "do not require" the trailing //. That reads as optional.
  • skills/review-docs/SKILL.md checked only that a multi-paragraph doc comment ends with //.
    An unwanted // after one paragraph was never a finding.
  • guidelines/protobuf.md § API documentation already had the rule right, but only for "a type
    or a field". It said "empty line" where it meant an empty comment line.

The change

  • documentation.md: the section is now "Protobuf doc comments". It covers every doc comment,
    whatever it documents: the file as a whole, a message, a field, a oneof, an enum or enum
    value, a service, or an RPC. A one-paragraph doc comment must not end with //, and a doc
    comment of two or more paragraphs must. It adds a right/wrong example and links to
    protobuf.md. The copyright notice is exempt, because it is not a doc comment.
  • protobuf.md: the same scope, "empty comment line (//)" wording, and copyright exemption.
  • review-docs: the Check A bullet makes either mistake a Should-fix. The .proto scope line,
    the authority list, and the Should-fix output list now match.

No other statement of the rule was found in guidelines/, skills/, or claude/. The
proofread skill and english-style.md cover only grammar and the scope of prose, so they are
unchanged. Nothing linked the old #protobuf-file-headers anchor.

Verification

  • Markdown only, so there is no build. git diff --check is clean. The longest added line is 96
    characters, under the 100-character limit.
  • The review-docs reviewer ran on the diff and returned APPROVE WITH CHANGES. Its should-fixes
    are applied: oneof is in the list, the copyright exemption is in protobuf.md, and the
    cross-reference is corrected.

🤖 Generated with Claude Code

A `.proto` doc comment of one paragraph ends with its text; a doc comment
of two or more paragraphs ends with an empty comment line (`//`).
`protobuf.md` already said so for types and fields. `documentation.md`
covered file headers only and called the line optional after a single
paragraph, and `review-docs` flagged only a missing `//`, never an
unwanted one, so a reviewer could not catch a trailing `//` after one
paragraph.

- `documentation.md`: rename "Protobuf file headers" to "Protobuf doc
  comments", cover every doc comment, state both sides of the rule, and
  add a right/wrong example. The copyright notice keeps its own layout.
- `protobuf.md`: the same scope, wording, and copyright exemption.
- `review-docs`: flag both mistakes as a Should-fix, and align the
  `.proto` scope line and the output list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 28, 2026 17:26
@alexander-yevsyukov alexander-yevsyukov changed the title Forbid a trailing // after a one-paragraph proto doc comment Forbid a trailing // after a one-paragraph proto doc comment Oct 28, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T17:28:39.619332Z 9132962 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approved

No active review issues are reported for the Protobuf documentation convention and review-skill updates.

No open issues 🎉

What changed in this PR

This PR makes the shared Protobuf documentation convention explicit and aligns the documentation-review skill so agents apply it consistently across Spine repositories.

Changes:

  • Forbid a trailing empty // line after one-paragraph doc comments and require it after multi-paragraph comments.
  • Apply the rule to all Protobuf doc comments, while exempting copyright notices.
  • Add correct/incorrect examples and classify either violation as a Should-fix.
File Description
skills/​review-docs/​SKILL.md Expands Protobuf review scope and explicitly flags both trailing-line violations.
guidelines/​protobuf.md Clarifies the rule’s scope, empty-comment-line syntax, and copyright exemption.
guidelines/​documentation.md Replaces header-only guidance with general doc-comment rules, examples, and cross-references.

Review effort: Balanced

@alexander-yevsyukov alexander-yevsyukov self-assigned this Oct 28, 2026
@alexander-yevsyukov alexander-yevsyukov moved this to In Review in v2.0 Oct 28, 2026
@alexander-yevsyukov
alexander-yevsyukov merged commit 5bb4b86 into master Oct 28, 2026
1 check passed
@alexander-yevsyukov
alexander-yevsyukov deleted the proto-doc-trailing-comment-line branch October 28, 2026 19:23
@github-project-automation github-project-automation Bot moved this from In Review to ✅ Done in v2.0 Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants