Thank you for your interest in contributing to Timber. This document provides some suggestions and guidelines on how you can get involved.
You can contribute to Timber in several ways:
- Contribute to feature development for the Timber codebase
- Report bugs
- Create articles and documentation for users and contributors
- Help others answer questions about Timber
Report a bug by creating an issue. Provide as much information as possible on how to reproduce the bug.
Before submitting the bug report, please make sure there are no existing issues with a similar bug report. You can search the existing issues for similar issues.
If you have an idea to improve Timber, submit a feature request. It will be good to describe the use cases and how it will benefit Timber users in your feature request.
You can submit pull requests to fix bugs, add new features or improve our documentation.
Here are some considerations you should keep in mind when making changes:
- While making changes
- Make your changes in a forked repo (instead of making a branch on the main Timber repo)
- Rebase from master instead of using
git pull
on your PR branch - Install pre-commit hooks to ensure all the default linters / formatters are run when you push.
- When making the PR
- Make a pull request from the forked repo you made
- Ensure you leave a release note for any user facing changes in the PR. There is a field automatically generated in the PR request. You can write
NONE
in that field if there are no user facing changes. - Please run tests locally before submitting a PR:
- For Go, the unit tests.
Fork the Timber Github repo and clone your fork locally. Then make changes to a local branch to the fork.
See Creating a pull request from a fork
Setup pre-commit
to automatically lint and format the codebase on commit:
-
Ensure that you have Python (3.7 and above) with
pip
, installed. -
Install
pre-commit
withpip
& install pre-push hooks# Clear existing hooks git config --unset-all core.hooksPath rm -rf .git/hooks # Install hooks make setup
-
On push, the pre-commit hook will run. This runs
make format
andmake lint
.
Timber is written using Go, and the following describes how to setup your development environment.
- Install Golang,
protoc
with the Golang & grpc plugins
We are using golangci-lint, and we can run the following commands for formatting.
# Formatting for linting issues
make format
# Checking for linting issues
make lint
For Unit tests, we follow the convention of keeping it beside the main source file.