-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Description
The GoDoc documentation for the brazilcode Go package is incomplete or outdated. This slows onboarding, limits IDE hover/auto‑complete quality, and increases the risk of incorrect API usage. We need to review and standardize all comments on exported symbols so automatic docs generated via go doc and pkg.go.dev accurately reflect the code.
Goals
-
Inventory all exported symbols
- List every function, method, type, constant, and variable exported by
brazilcode.
- List every function, method, type, constant, and variable exported by
-
Review and standardize comments
- Follow the Go convention: the first sentence starts with the symbol’s name (e.g.,
// DecodeCPF parses …). - Clarify parameters, return values, and possible errors.
- Add concise runnable examples using Example functions (
func ExampleDecodeCPF() { … }).
- Follow the Go convention: the first sentence starts with the symbol’s name (e.g.,
-
Automate documentation checks
- Add a CI step running
golangci-lint run --enable godot(or similar) to block merges lacking proper comments.
- Add a CI step running
Acceptance Criteria
- 100 % of symbols exported by
brazilcodehave valid GoDoc comments. - At least one executable example per public sub‑package passes under
go test. - README includes install instructions and a pkg.go.dev link.
- CI pipeline fails if documentation coverage regresses.
- Review approved by 1 Go Developer and 1 Tech Writer.
Expected Impact
Consistent, accurate docs for brazilcode will boost developer experience, reduce misuse, and shorten ramp‑up time for new contributors.
Helpful Resources
- Official guide: https://go.dev/doc/comment
- Comment linting:
golangci-lintrule godot - Example functions: https://pkg.go.dev/testing#hdr-Examples
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation