mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-05 08:02:13 +00:00
Clarify code style guidelines
This commit is contained in:
parent
6b47052491
commit
601c97c015
@ -31,24 +31,35 @@ latest info on Transifex.
|
|||||||
|
|
||||||
## Contributing Code
|
## Contributing Code
|
||||||
|
|
||||||
Please do contribute! If you want to contribute but are unsure where to
|
Every contribution is welcome. If you want to contribute but are unsure
|
||||||
start, the [Contributions Needed
|
where to start, any open issues are fair game! Be prepared for a
|
||||||
topic](http://discourse.syncthing.net/t/49) lists areas in need of
|
[certain amount of review](https://discourse.syncthing.net/t/733); it's
|
||||||
attention. In general, any open issues are fair game! Be prepared for a
|
all in the name of quality. :) Following the points below will make this
|
||||||
[certain amount of
|
a smoother process.
|
||||||
review](https://discourse.syncthing.net/t/733); it's all in the name of
|
|
||||||
quality. :)
|
|
||||||
|
|
||||||
You may be asked to "rebase" or "squash" your pull request before it's
|
## Coding Style
|
||||||
accepted. This means to make sure that the pull request:
|
|
||||||
|
|
||||||
- Is based on the latest commit on `master`.
|
- Follow the conventions laid out in [Effective Go](https://golang.org/doc/effective_go.html)
|
||||||
|
as much as makes sense.
|
||||||
|
|
||||||
- Only contains a single commit (exceptions to be made where
|
- All text files use Unix line endings.
|
||||||
appropriate).
|
|
||||||
|
|
||||||
- Has a descriptive commit message, ending in `(fixes #123)` if it
|
- Each commit should be `go fmt` clean.
|
||||||
resolves an existing issue.
|
|
||||||
|
- The commit message subject should be a single short sentence
|
||||||
|
describing the change, starting with a capital letter.
|
||||||
|
|
||||||
|
- Commits that resolve an existing issue must include the issue number
|
||||||
|
as `(fixes #123)` at the end of the commit message subject.
|
||||||
|
|
||||||
|
- Imports are grouped per `goimports` standard; that is, standard
|
||||||
|
library first, then third party libraries after a blank line.
|
||||||
|
|
||||||
|
- A contribution solving a single issue or introducing a single new
|
||||||
|
feature should probably be a single commit based on the current
|
||||||
|
`master` branch. You may be asked to "rebase" or "squash" your pull
|
||||||
|
request to make sure this is the case, especially if there have been
|
||||||
|
amendments during review.
|
||||||
|
|
||||||
## Licensing
|
## Licensing
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user