Welcome to the Kisumu programming language development community! Follow this guide to set up your environment and start contributing.
Ensure you have the following tools installed:
- Go (1.21 or higher): Download Go.
- Git: Download Git.
- Editor/IDE: Visual Studio Code (recommended) or any editor of your choice.
- Make: Pre-installed on Linux/macOS. Windows users can use Make for Windows.
- golangci-lint: Install the linter for Go projects:
$ go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# Clone the Kisumu Lang repository
$ git clone https://github.com/Zone01-Kisumu-Open-Source-Projects/kisumu-lang.git
# Navigate into the project directory
$ cd kisumu-lang
Kisumu uses Go modules for dependency management. Initialize the project as follows:
# Verify Go is installed
$ go version
# Initialize the Go module (if not already done)
$ go mod tidy
Install any necessary packages:
$ make install
Note: If
make
is not installed, refer to the "Prerequisites" section to set it up.
Ensure everything works by running the unit tests:
$ make test
Compile the Kisumu language interpreter:
$ make build
The compiled binary will be placed in the bin/
directory.
Start the Kisumu Read-Eval-Print Loop (REPL) for interactive experimentation:
$ ./bin/kisumu-repl
Kisumu uses golangci-lint
for static analysis and linting. Run the following commands to ensure code quality:
$ make lint
$ make format
Note: The CI/CD pipeline will also run linting and formatting checks. Ensure your code passes these checks before submitting a pull request.
- Fork the Repository: Create your own copy of the project.
- Create a Feature Branch:
$ git checkout -b feature/awesome-feature
- Write Code and Tests: Ensure your changes are thoroughly tested.
- Run Lint and Formatting Checks:
$ make pre-commit
- Submit a Pull Request: Push your changes and open a PR for review.
- Use descriptive commit messages, e.g.,
Feat(literals): Add support for integer literals.
- Follow the contribution guidelines.
Kisumu uses GitHub Actions for continuous integration and deployment. The pipeline performs the following tasks:
- Build: Compiles the project on multiple platforms (Linux, macOS, Windows).
- Test: Runs unit tests and generates a coverage report.
- Lint: Checks code quality using
golangci-lint
. - Format: Ensures code is properly formatted.
You can view the pipeline status on the Actions tab in the repository.
If you encounter any issues: