Thank you for your interest in contributing to RCDS_GO! This document provides guidelines for contributing to the project.
This project adheres to a code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
- Go 1.24 or later
- Git
- Make
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/RCDS_GO.git cd RCDS_GO -
Add the upstream repository:
git remote add upstream https://github.com/String-Reconciliation-Ditributed-System/RCDS_GO.git
-
Install dependencies:
go mod download
-
Build the project:
make build
-
Run tests:
make test make integration-test make e2e-test
Create a new branch for your work:
git checkout -b feature/your-feature-nameUse descriptive branch names:
feature/for new featuresbugfix/for bug fixesdocs/for documentation changestest/for test improvements
- Make your changes in the appropriate files
- Add tests for new functionality
- Ensure all tests pass:
make test - Format your code:
make fmt - Run linters:
make lint - Run vet:
make vet
Write clear commit messages that describe your changes:
Short (50 chars or less) summary
More detailed explanatory text, if necessary. Wrap it to about 72
characters. The blank line separating the summary from the body is
critical.
- Bullet points are okay
- Use present tense ("Add feature" not "Added feature")
- Reference issues and pull requests liberally
- Write unit tests for all new code
- Ensure all tests pass before submitting
- Aim for high test coverage
- Run tests with:
make test - Run build-tagged integration and e2e tests when changing CLI, TCP, or file sync behavior
- Check coverage with:
make test-coverage
- Follow standard Go conventions
- Use
gofmtto format code - Run
go vetto catch common errors - Use
golangci-lintfor additional linting - Write clear, concise comments for exported functions
- Use meaningful variable and function names
-
Push your changes to your fork:
git push origin feature/your-feature-name
-
Open a pull request on GitHub
-
Fill in the pull request template
-
Link any related issues
-
Wait for review
- Keep pull requests focused on a single feature or fix
- Include tests for new functionality
- Update documentation as needed
- Ensure CI/CD checks pass
- Respond to review comments promptly
RCDS_GO/
├── cmd/ # Command-line application
├── pkg/ # Library code
│ ├── file/ # File utilities
│ ├── lib/ # Core libraries
│ │ ├── algorithm/ # Reconciliation algorithms
│ │ └── genSync/ # Generic sync interface
│ ├── set/ # Set data structure
│ └── util/ # Utility functions
├── docs/ # Documentation
│ └── index.html # GitHub Pages website
└── .github/ # GitHub workflows
make test
make integration-test
make e2e-testmake test-coverageThis generates a coverage report in coverage.html.
make lint- Update documentation for any user-facing changes
- Update
docs/index.htmlanddocs/assets/site.cssfor website changes - Update
docs/CLI.mdwhen flags, commands, or examples change - Add godoc comments for exported functions
- Update README.md for major changes
- Add examples for new features
When reporting bugs, include:
- Go version
- Operating system
- Steps to reproduce
- Expected behavior
- Actual behavior
- Error messages or logs
When requesting features, include:
- Use case description
- Proposed solution
- Alternative solutions considered
- Potential impact
If you have questions, please:
- Check existing documentation
- Search existing issues
- Open a new issue with the question label
By contributing to RCDS_GO, you agree that your contributions will be licensed under the same license as the project.