First off, thank you for considering contributing to Wasabi. It's people like you that make Wasabi such a great tool.
If you've noticed a bug or have a feature request, make one! It's generally best if you get confirmation of your bug or approval for your feature request this way before starting to code.
If this is something you think you can fix, then fork Wasabi and create a branch with a descriptive name.
A good branch name would be (where issue #123 is the ticket you're working on):
git checkout -b 123-add-contributors-guidelines
To help you with your development environment, you can install some tools with
make install
Make sure you're using the latest version of Go. Then, run the test suite to ensure everything is working correctly:
make test
Install recomended version of golangci-lint 1.55.2, by following gudelines on this page.
To run golangci-lint localy, you can run command:
make lint
Install recomended verison of mockery v2.42.1, by following guidelines on this page
To run generation of mocks, you can use command:
make mocks
The linter has enabled rule for field alignment, to simplify fixing alignment errors it's recomended to use fieldaligment tool.
go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest
At this point, you're ready to make your changes! Feel free to ask for help; everyone is a beginner at first.
At this point, you should switch back to your master branch and make sure it's up to date with Wasabi's master branch:
git remote add upstream [email protected]:ksysoev/wasabi.git
git checkout master
git pull upstream master
Then update your feature branch from your local copy of master, and push it!
git checkout 123-add-contributors-guidelines
git rebase master
git push --set-upstream origin 123-add-contributors-guidelines
Finally, go to GitHub and make a Pull Request.
If a maintainer asks you to "rebase" your PR, they're saying that a lot of code has changed, and that you need to update your branch so it's easier to merge.
A PR can only be merged into master by a maintainer if:
- It is passing CI.
- It has been approved by at least one maintainer. If it was a maintainer who opened the PR, only an additional maintainer can approve it.
- It has requested changes.
- It is up to date with current master.
Any maintainer is allowed to merge a PR if all of these conditions are met.