Thank you for your interest in contributing to mcp-datahub!
- Go 1.24 or later
- golangci-lint v2.7+
- gosec
- govulncheck
git clone https://github.com/txn2/mcp-datahub.git
cd mcp-datahub
make tidy
make verify- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Run tests:
make verify - Commit with a descriptive message
- Push and create a Pull Request
Follow conventional commits:
feat:New featuresfix:Bug fixesdocs:Documentation changestest:Test additions/changesrefactor:Code refactoringchore:Maintenance tasks
- Follow Effective Go
- Use
gofmtandgoimports - Keep functions focused and small
- Use meaningful variable names
- Always wrap errors with context:
fmt.Errorf("operation failed: %w", err) - Use sentinel errors for known error conditions
- Never ignore errors silently
- Write table-driven tests
- Aim for >80% coverage
- Test both success and failure paths
- Use mocks for external dependencies
- Add godoc comments to all exported types and functions
- Keep comments up to date with code changes
- Include examples where helpful
- Tests pass:
make test - Linting passes:
make lint - Security scans pass:
make security - Documentation updated if needed
- Commit messages follow conventions
Open an issue or start a discussion on GitHub.