Thank you for your interest in contributing to CloudEmu! This guide will help you get started.
- Fork the repository
- Clone your fork:
git clone https://github.com/<your-username>/cloudemu.git cd cloudemu
- Create a feature branch from
development:git checkout development git checkout -b feature/your-feature-name
Requirements:
- Go 1.25.0+
- golangci-lint v2
go build ./... # compile all packages
go test ./... # run all tests
go vet ./... # static analysis- Max line length: 140 characters
- Max cyclomatic complexity: 10
- Max function length: 100 lines / 50 statements
- No magic numbers — use named constants
- Import ordering: stdlib, third-party, local module (enforced by
gci) - Thread safety: all mock implementations must use
sync.RWMutex
Run the linter before submitting:
golangci-lint run --timeout=9m ./...Fix all issues. If a //nolint directive is needed, always include an explanation.
- Add types and methods to the driver interface (
<service>/driver/driver.go) - Implement in all 3 providers (AWS, Azure, GCP)
- Wire through the portable API layer (
<service>/<service>.go) - Add integration tests to
cloudemu_test.go - Add unit tests to each provider test file
- Run linter and full test suite
- Create driver interface in
<service>/driver/driver.go - Create provider implementations in
providers/{aws,azure,gcp}/<service>/ - Add field to each Provider struct
- Initialize in each
New()factory - Add portable API wrapper
- Add tests
- All 3 providers (AWS, Azure, GCP) must implement the same behaviors
- Use
cerrors.New()/cerrors.Newf()for error codes - Use
config.FakeClockfor deterministic time in tests - Use
memstore.Store[V]for in-memory storage - Use
idgenfor cloud-native ID generation
- Ensure all tests pass:
go test ./... - Ensure linter passes:
golangci-lint run --timeout=9m ./... - Push your branch and create a PR against
development - Include a summary of what changed and why in the PR description
- Use GitHub Issues to report bugs or request features
- Include steps to reproduce for bug reports
- Tag issues with appropriate labels (aws, azure, gcp, enhancement, bug)
By contributing, you agree that your contributions will be licensed under the MIT License.