Thank you for your interest in contributing to Xel! This document provides guidelines and instructions for contributing to the project.
- Code of Conduct
- Getting Started
- Development Workflow
- Pull Request Process
- Coding Standards
- Testing
- Building
- Documentation
- Release Process
- Issue Reporting
- Feature Requests
By participating in this project, you are expected to uphold our Code of Conduct:
- Be respectful and inclusive
- Be patient and welcoming
- Be thoughtful
- Be collaborative
- When disagreeing, try to understand why
- Fork the repository on GitHub
- Clone your fork locally
git clone https://github.com/YOUR-USERNAME/xel.git cd xel - Add the upstream repository as a remote
git remote add upstream https://github.com/dev-kas/xel.git
- Install dependencies
go mod download
-
Create a branch for your feature or bugfix
git checkout -b feature/your-feature-name
or
git checkout -b fix/your-bugfix-name
-
Make your changes and commit them with clear, descriptive commit messages
git commit -m "Add feature: your feature description" -
Keep your branch updated with the upstream repository
git fetch upstream git rebase upstream/master
-
Push your changes to your fork
git push origin feature/your-feature-name
- Submit a pull request from your forked repository to the master branch of the main repository
- Ensure your PR description clearly describes the problem and solution
- Include issue numbers in your PR description (e.g., "Fixes #123")
- Update documentation if necessary
- Ensure all tests pass and add new tests for new functionality
- Request a review from maintainers
- Follow Go's official Code Review Comments
- Run
go fmt ./...before committing to ensure consistent formatting - Use
go vetandgolintto check for common issues - Write clear, descriptive variable and function names
- Add comments for non-obvious code sections
- Keep functions small and focused on a single responsibility
- Write tests for all new features and bug fixes
- Ensure all tests pass before submitting a pull request
- Run tests using:
go test ./... - Aim for high test coverage for critical functionality
The project includes a Makefile with several targets:
-
Build for all platforms:
make build
-
Build for specific platforms:
make build-mac make build-linux make build-windows
-
Run tests:
make test
- Update documentation for any changes to functionality
- Document all public APIs
- Keep README.md updated with the latest information
- Add examples for new features
Xel follows Semantic Versioning (SemVer):
- MAJOR version for incompatible API changes (X.0.0)
- MINOR version for backward-compatible functionality additions (0.X.0)
- PATCH version for backward-compatible bug fixes (0.0.X)
The version is set in the main.go file and is overridden during build using ldflags.
Xel uses GitHub Actions for continuous integration and automated releases:
- Every push to the master branch and pull requests are automatically built and tested
- The CI workflow is defined in
.github/workflows/ci.yml - CI builds include a development version number based on the git commit hash
Only project maintainers should create official releases. The process is:
- Ensure all tests pass and the code is ready for release
- Update version references in documentation if necessary
- Create and push a new tag with the version number following SemVer:
git tag v1.0.0 git push origin v1.0.0
- The release workflow (
.github/workflows/release.yml) will automatically:- Build binaries for all supported platforms
- Create a GitHub Release with the binaries attached
- Generate release notes based on commits since the last release
Xel follows Semantic Versioning:
- MAJOR version for incompatible API changes
- MINOR version for backward-compatible functionality additions
- PATCH version for backward-compatible bug fixes
For significant changes, consider using release candidates:
git tag v1.0.0-rc1
git push origin v1.0.0-rc1When reporting issues, please include:
- Description of the issue
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Environment details (OS, Go version, etc.)
- Logs or error messages
- Possible solutions (if you have any ideas)
For feature requests, please include:
- Description of the feature
- Rationale for the feature (why it's needed)
- Example usage of the feature
- Possible implementation details (if you have ideas)
Thank you for contributing to Xel!