Thank you for your interest in contributing to glisk! This document provides guidelines and information for contributors.
- Go 1.21 or later
- Docker (optional, for containerized development)
- Make (optional, for using Makefile targets)
-
Fork and clone the repository
git clone https://github.com/your-username/glisk.git cd glisk -
Install dependencies
make deps # or go mod download -
Run tests
make test # or go test ./...
-
Build the application
make build # or go build -o glisk ./cmd/main.go -
Run the application
make run # or ./glisk
- Follow Go conventions and best practices
- Use
gofmtfor code formatting - Follow the project's linting rules (see
.golangci.yml)
make lint
# or
golangci-lint runmake test
# or
go test -v ./...make test-coverage
# or
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out- Create a feature branch from
main - Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Update documentation if needed
- Submit a pull request
We follow Conventional Commits for commit messages:
feat:for new featuresfix:for bug fixesdocs:for documentation changesstyle:for formatting changesrefactor:for code refactoringtest:for adding or updating testschore:for maintenance tasks
Examples:
feat: add support for custom metrics labels
fix: resolve memory leak in directory collector
docs: update README with new configuration options
- Create a descriptive PR title that follows conventional commits
- Fill out the PR template completely
- Ensure CI passes - all tests, linting, and security scans must pass
- Add tests for new functionality
- Update documentation if needed
- Request review from maintainers
- Write unit tests for new functionality
- Ensure existing tests continue to pass
- Aim for good test coverage
- Test configuration loading and validation
- Test metrics collection functionality
- Test error handling and edge cases
- Test with different configuration scenarios
- Verify metrics output in Prometheus format
- Test Docker container builds and runs
- Add comments for complex logic
- Document exported functions and types
- Include examples where helpful
- Update README.md for user-facing changes
- Add configuration examples
- Update CHANGELOG.md for significant changes
This project uses Release Please for automated releases.
- Use conventional commit messages
- Merge to
mainbranch - Release Please will automatically create releases
- Review and merge PRs
- Monitor CI/CD pipeline
- Review and publish releases
- Issues: Use GitHub issues for bug reports and feature requests
- Discussions: Use GitHub Discussions for questions and general discussion
- Security: Report security issues privately to maintainers
This project follows the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
By contributing to glisk, you agree that your contributions will be licensed under the MIT License.