Contributing Guidelines
Guidelines and best practices for contributing to the Divekit project.
Thank you for considering contributing to Divekit! This document outlines our contribution process and guidelines.
Code of Conduct
- Be respectful and inclusive
- Follow professional standards
- Help others learn and grow
- Report unacceptable behavior
Getting Started
- Fork the repository
- Set up your development environment
- Create a feature branch
- Make your changes
- Submit a pull request
Development Process
Branching Strategy
main
: Production-ready codedevelop
: Integration branch- Feature branches:
feature/your-feature
- Bugfix branches:
fix/issue-description
Commit Messages
Follow conventional commits:
type(scope): description
[optional body]
[optional footer]
The commit message header consists of three parts:
type
: Categorizes the type of change (see below)scope
: Indicates the section of the codebase being changed (e.g.cli
,core
,config
,parser
)description
: Brief description of the change in imperative mood
Examples:
feat(cli): add new flag for verbose output
fix(parser): handle empty config files correctly
docs(readme): update installation instructions
test(core): add tests for user authentication
Types:
feat
: New feature or functionalityfix
: Bug fixdocs
: Documentation changesstyle
: Formatting, missing semicolons, etc. (no code changes)refactor
: Code restructuring without changing functionalitytest
: Adding or modifying testschore
: Maintenance tasks, dependencies, etc.
The body should explain the “why” of the change, while the description explains the “what”.
Pull Requests
- Update documentation
- Add/update tests
- Ensure CI passes
- Request review
- Address feedback
Code Style
- Follow Go best practices and idioms
- Use
gofmt
for consistent formatting - Follow the official Go Code Review Comments
- Use
golint
andgolangci-lint
- Write clear, idiomatic Go code
- Keep functions focused and well-documented
Testing
- Write unit tests using the standard
testing
package - Use table-driven tests where appropriate
- Aim for good test coverage
- Write integration tests for complex functionality
- Use
go test
for running tests - Consider using testify for assertions
Documentation
- Write clear godoc comments
- Update README.md and other documentation
- Include examples in documentation
- Document exported functions and types
- Keep documentation up to date with changes
Review Process
- Automated checks (golangci-lint, tests)
- Code review
- Documentation review
- Final approval
- Merge
Release Process
- Version bump
- Changelog update
- Tag release
- Documentation update
Last modified January 17, 2025: fix style after docsy upgrade (6313765)