You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+30-10Lines changed: 30 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,22 +37,42 @@ to re-work some of it and the discouragement that goes along with that.
37
37
38
38
### Process
39
39
40
-
When you first post a PR, we request that the commit history get cleaned
41
-
up. We recommend avoiding this during the PR to make it easier to review how
42
-
feedback was handled. Once the commit is ready, we'll ask you to clean up the
43
-
commit history. Once you let us know this is done, we can move forward with
44
-
merging! If you are uncomfortable with these parts of git, let us know and we
45
-
can help.
46
-
47
-
We ask that all new files have the copyright header. Please update the
48
-
copyright year for files you are modifying.
49
-
50
40
As a heads up, we'll be running your PR through the following gauntlet:
51
41
- warnings turned to compile errors
52
42
-`cargo test`
53
43
-`rustfmt`
54
44
-`clippy`
55
45
-`rustdoc`
46
+
-[`committed`](https://github.com/crate-ci/committed) as we use [Conventional](https://www.conventionalcommits.org) commit style
47
+
-[`typos`](https://github.com/crate-ci/typos) to check spelling
48
+
49
+
Not everything can be checked automatically though.
50
+
51
+
We request that the commit history gets cleaned up.
52
+
We ask that commits are atomic, meaning they are complete and have a single responsibility.
53
+
PRs should tell a cohesive story, with test and refactor commits that keep the
54
+
fix or feature commits simple and clear.
55
+
56
+
Specifically, we would encouage
57
+
- File renames be isolated into their own commit
58
+
- Add tests in a commit before their feature or fix, showing the current behavior.
59
+
The diff for the feature/fix commit will then show how the behavior changed,
60
+
making it clearer to reviewrs and the community and showing people that the
61
+
test is verifying the expected state.
62
+
- e.g. [clap#5520](https://github.com/clap-rs/clap/pull/5520)
63
+
64
+
Note that we are talking about ideals.
65
+
We understand having a clean history requires more advanced git skills;
66
+
feel free to ask us for help!
67
+
We might even suggest where it would work to be lax.
68
+
We also understand that editing some early commits may cause a lot of churn
69
+
with merge conflicts which can make it not worth editing all of the history.
70
+
71
+
For code organization, we recommend
72
+
- Grouping `impl` blocks next to their type (or trait)
73
+
- Grouping private items after the `pub` item that uses them.
74
+
- The intent is to help people quickly find the "relevant" details, allowing them to "dig deeper" as needed. Or put another way, the `pub` items serve as a table-of-contents.
0 commit comments