Skip to content

docs: Update CONTRIBUTING.md to clarify documentation requirements for exported types #3693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zyfy29
Copy link
Contributor

@zyfy29 zyfy29 commented Aug 20, 2025

I mentioned it in the #3666 but forgot to do in the former pr. I think it's better to notify the rule here as well.

@Copilot Copilot AI review requested due to automatic review settings August 20, 2025 06:50
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the CONTRIBUTING.md documentation to clarify that documentation requirements apply to both exported methods and types, not just methods. It adds an example showing how to properly document exported types following Go documentation conventions.

  • Expands documentation requirements from "exported methods" to "exported methods and types"
  • Adds a concrete example demonstrating proper type documentation format

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

...
}
```
And the returned type `Repository` will have comments like this:
Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

The phrase 'returned type' is misleading since Repository may not necessarily be a return type in all contexts. Consider using 'exported type' instead to be more accurate and consistent with the updated guideline.

Suggested change
And the returned type `Repository` will have comments like this:
And the exported type `Repository` will have comments like this:

Copilot uses AI. Check for mistakes.

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.

1 participant