docs: extend CONTRIBUTING.md with code guidelines#4202
Open
jlaportebot wants to merge 1 commit intogoogle:masterfrom
Open
docs: extend CONTRIBUTING.md with code guidelines#4202jlaportebot wants to merge 1 commit intogoogle:masterfrom
jlaportebot wants to merge 1 commit intogoogle:masterfrom
Conversation
Add comprehensive section documenting common code patterns and conventions: - Naming conventions (files, receivers, types, methods, variables) - JSON tags for request bodies (required vs optional fields, omitzero) - URL tags for query parameters (non-pointer fields with omitempty) - Pagination patterns (ListOptions, ListCursorOptions, best practices) - Common types (ID, NodeID, Timestamp, boolean fields) - Generation patterns (accessors, iterators, documentation, linter rules) This addresses issue google#4023 and helps new contributors understand the codebase better, reducing review burden and improving code consistency.
gmlewis
approved these changes
May 8, 2026
Collaborator
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @jlaportebot.
LGTM.
cc: @alexandear
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4202 +/- ##
=======================================
Coverage 93.71% 93.71%
=======================================
Files 209 209
Lines 19772 19772
=======================================
Hits 18529 18529
Misses 1046 1046
Partials 197 197 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR extends CONTRIBUTING.md with a comprehensive section on code guidelines and conventions, addressing issue #4023.
Changes
Added a new "Code Guidelines" section that documents:
Naming Conventions
JSON Tags for Request Bodies
URL Tags for Query Parameters
Pagination
Common Types
Generation Patterns
Benefits
Testing
This is a documentation-only change. No code changes or tests needed.
Closes #4023