28
28
29
29
## Pull requests
30
30
31
- ---
32
-
33
- ** Please note:** I'm still working on formulating Mutagen's pull request policy.
34
- I'm trying to make it as simple as possible while ensuring code quality and
35
- project longevity. I very much want community contributions, but I haven't had
36
- an extensive amount of time to review pull requests or formulate a review
37
- process. I'm working on changing this, so I ask you to bear with me for just a
38
- little longer. Thank you!
39
-
40
- – Jacob
41
-
42
- ---
43
-
44
31
Before taking the time to implement a change or feature, please discuss the
45
32
proposed change on the
33
+ [ issue tracker] ( https://github.com/mutagen-io/mutagen/issues ) or
46
34
[ Mutagen Community Slack Workspace] ( https://mutagen.io/slack ) .
47
35
48
36
If it * does* make sense to open a pull request, please adhere to the following
49
- guidelines. Pull requests that don't follow these guidelines will simply be
50
- closed.
37
+ guidelines. Pull requests that don't follow these guidelines will be closed.
51
38
52
39
53
- ### Contributor License Agreement
40
+ ### Developer Certificate of Origin
54
41
55
- Mutagen pull requests will require a Contributor License Agreement, though the
56
- exact form of this agreement is still being decided.
42
+ Pull requests to Mutagen must be submitted under the terms of the
43
+ [ Developer Certificate of Origin (DCO)] ( DCO ) . In order to accept a pull request,
44
+ we require that you sign-off all commits in the pull request using the ` -s ` flag
45
+ with ` git commit ` to indicate that you agree to the terms of the DCO. You must
46
+ also
47
+ [ cryptographically sign] ( https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits )
48
+ your commits to verify your DCO sign-off.
57
49
58
50
59
51
### Code guidelines
@@ -62,33 +54,40 @@ In order to ensure that Mutagen's codebase remains clean and understandable to
62
54
all developers, we kindly request that:
63
55
64
56
- Code adheres to Go style guidelines, including those in
65
- [ Effective Go] ( https://golang.org /doc/effective_go.html ) and the
57
+ [ Effective Go] ( https://go.dev /doc/effective_go ) and the
66
58
[ Go Code Review Comments] ( https://github.com/golang/go/wiki/CodeReviewComments )
67
59
- All code be ` go fmt ` 'd
68
- - Comments be wrapped at 80 columns (with exceptions for long strings like URLs)
69
- - Comments be used to break up code (see existing code for examples) and be
70
- composed of full and complete sentences
71
- - New code include full test coverage
72
-
73
- Basically, when in doubt, new code should share the same style as the
74
- surrounding code.
60
+ - New code matches the style and structure of its surrouding code (unless a full
61
+ refactor/rewrite of a package is being performed)
62
+ - Comments be wrapped at 80 columns (with exceptions for long strings like URLs
63
+ that can't be wrapped)
64
+ - Code does not need to be wrapped at 80 lines, but please do try to keep
65
+ lines to a reasonable length
66
+ - Comments be used to break up code blocks and be composed of full and complete
67
+ sentences
68
+ ([ example] ( https://github.com/mutagen-io/mutagen/blob/67a94630f3f6ccf7fe7246b30ad75e68326ca2d1/pkg/synchronization/core/scan.go#L142-L240 ) )
69
+ - Imports be grouped by module, with standard library packages in the first
70
+ group ([ example] ( https://github.com/mutagen-io/mutagen/blob/master/cmd/mutagen/forward/create.go#L3-L25 ) )
71
+ - Non-trivial changes include full test coverage
75
72
76
73
77
74
### Commit guidelines
78
75
79
76
To help keep source control logs readable and useful, we also ask that all
80
- commits have well-formatted commit messages composed of a single subject line of
81
- 50-70 characters, followed by a blank line, and finally the full, correctly
82
- punctuated commit message (also wrapped to 80 lines). We ask the same for the
83
- pull request message itself.
77
+ commits have well-formatted commit messages that follow the
78
+ [ Go commit message guidelines] ( https://go.dev/doc/contribute#commit_messages ) .
79
+ The component in the first line must be one of those listed in
80
+ ` scripts/ci/commitlint/config.json ` and lines must not exceed 72 characters in
81
+ length.
84
82
85
83
Here's an example of a good message:
86
84
87
- Modified synchronization controller state locking
85
+ sync: modified controller state locking
88
86
89
- This commit modifies the synchronization controller's state locking to take
90
- into account changes that can occur during shutdown. It requires that the
91
- synchronization Goroutine hold the state lock until fully terminated.
87
+ This commit modifies the synchronization controller's state locking to
88
+ take into account changes that can occur during shutdown. It requires
89
+ that the synchronization Goroutine hold the state lock until fully
90
+ terminated.
92
91
93
92
Fixes #00000
94
93
0 commit comments