Contributing Guide
Guidelines
- Before starting work on a feature or bug fix, search GitHub or reach out to us via GitHub or Slack, make sure no one else is already working on it and we'll ask you to open a GitHub issue if necessary.
- Before contributing, use the GitHub issue to discuss the feature and reach an agreement with the core developers.
- For major feature updates, write a design document to help the community understand your motivation and solution.
- Find issues with the label "kind/good-first-issue" or "kind/help-wanted".
Read internals for important data structure references.
Coding style
- We're following "Effective Go" and "Go Code Review Comments".
- Use
go fmt
to format your code before committing. You can find information in editor support for Go tools in "IDEs and Plugins for Go". - Every new source file must begin with a license header.
- Install pre-commit and use it to set up a pre-commit hook for static analysis. Just run
pre-commit install
in the root of the repo.
Sign the CLA
Before you can contribute to JuiceFS, you will need to sign the Contributor License Agreement. There're a CLA assistant to guide you when you first time submit a pull request.
What is a good PR
- Presence of unit tests
- Adherence to the coding style
- Adequate in-line comments
- Explanatory commit message
Contribution flow
- Create a topic branch from where to base the contribution. This is usually
main
. - Make commits of logical units.
- Make sure commit messages are in the proper format.
- Push changes in a topic branch to a personal fork of the repository.
- Submit a pull request to
juicedata/juicefs
. The PR should link to one issue which either created by you or others. - The PR must receive approval from at least one maintainer before it be merged.