Thanks for your interest in contributing! This guide covers the basics.
Prerequisites:
- Go 1.25+
- git
Clone and build:
git clone https://github.com/pinealctx/gcode.git
cd gcode
go build ./...Run tests:
go test ./...Run linters (requires golangci-lint):
golangci-lint run ./...Follow the Uber Go Style Guide. Key points:
- Use
anyinstead ofinterface{} - Exported functions and types must have doc comments
- Error messages should be lowercase, no trailing punctuation
- Group imports: stdlib / third-party / local
Run go fmt ./... before committing.
- Discuss first — Open an issue describing the problem and proposed solution before writing code.
- Small PRs — One logical change per PR. Keep it reviewable.
- Tests required — Every bug fix or feature must include test cases.
- Generated code — Never manually edit generated files in
testdata/compat/dao/. If the generator has a bug, fix the generator (underinternal/), then regenerate viacd testdata/compat/gen && go run main.go.
# Unit tests
go test ./...
# End-to-end compatibility tests
go test ./testdata/compat/...
# Regenerate test snapshots (after generator changes)
cd testdata/compat/gen && go run main.go| Directory | Purpose |
|---|---|
cmd/gcode/ |
CLI entry point |
internal/ |
Generator implementation (not for external import) |
options/ |
Embedded proto definitions (public) |
runtime/ |
Wire format encoding primitives (public) |
validateruntime/ |
Validation runtime helpers (public) |
httpruntime/ |
HTTP runtime helpers (public) |
testdata/compat/ |
End-to-end compatibility test suite |
docs/ |
User documentation |
- Include a minimal
.protofile that reproduces the problem. - Include the gcode version (
gcode -houtput or commit hash). - Describe expected vs actual behavior.
This project follows the Contributor Covenant Code of Conduct. By participating, you agree to uphold it.