Thank you for your interest in contributing to opencligen! This document provides guidelines and instructions for contributing.
- Go 1.22 or later
- Make (optional, but recommended)
- golangci-lint (for linting)
-
Clone the repository:
git clone https://github.com/crunchloop/opencligen.git cd opencligen -
Install dependencies:
go mod download
-
Run tests:
make test # or go test ./...
-
Run linting:
make lint # or golangci-lint run -
Build the binary:
make build # or go build -o bin/opencligen ./cmd/opencligen
- Follow standard Go conventions and idioms
- Run
make fmtbefore committing to format code - Ensure all linting checks pass with
make lint - Add tests for new functionality
- Write tests for any new functionality
- Ensure all existing tests pass before submitting a PR
- Aim for at least 80% test coverage for new code
- Run
make coverageto check coverage
- Use clear, concise commit messages
- Start with a verb in imperative mood (e.g., "Add", "Fix", "Update")
- Reference related issues when applicable
- Fork the repository and create a feature branch
- Make your changes and ensure all tests pass
- Update documentation if needed
- Submit a pull request with a clear description of the changes
opencligen/
├── cmd/opencligen/ # CLI entry point
├── internal/
│ ├── spec/ # OpenAPI spec parsing
│ ├── plan/ # CLI command planning
│ ├── gen/ # Code generation
│ └── runtime_skel/ # Runtime library skeleton
├── .github/workflows/ # CI/CD configuration
└── Makefile # Build automation
If you have questions or need help, please open an issue on GitHub.