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
1.`git rebase` into concise commits and remove `--fixup`s or `wip` commits (`git rebase -i HEAD~NUM` where `NUM` is number of commits back to start the rebase)
103
-
2. Push your changes back to your fork (`git push origin $your-branch`)
104
-
3. Create a pull request against `master`! (You can also create the pull request first, and we'll merge when ready. This a good way to discuss proposed changes.)
105
-
106
-
PR expectations:
107
-
- Changes are tested and, if needed, documented
108
-
- PRs remain small and focused
109
-
- If needed, we can put changes behind feature flags as they evolve
110
-
- Commits are atomic (i.e. do a single thing)
111
-
- Commits are in [Conventional Commit](https://www.conventionalcommits.org/) style
112
-
113
-
We recognize that these are ideals and we don't want lack of comfort with git
114
-
to get in the way of contributing. If you didn't do these, bring it up with
115
-
the maintainers and we can help work around this.
102
+
As a heads up, we'll be running your PR through the following gauntlet:
103
+
- warnings turned to compile errors
104
+
-`cargo test`
105
+
-`rustfmt`
106
+
-`clippy`
107
+
-`rustdoc`
108
+
-[`committed`](https://github.com/crate-ci/committed) as we use [Conventional](https://www.conventionalcommits.org) commit style
109
+
-[`typos`](https://github.com/crate-ci/typos) to check spelling
110
+
111
+
Not everything can be checked automatically though.
112
+
113
+
We request that the commit history gets cleaned up.
114
+
We ask that commits are atomic, meaning they are complete and have a single responsibility.
115
+
PRs should tell a cohesive story, with test and refactor commits that keep the
116
+
fix or feature commits simple and clear.
117
+
118
+
Specifically, we would encouage
119
+
- File renames be isolated into their own commit
120
+
- Add tests in a commit before their feature or fix, showing the current behavior.
121
+
The diff for the feature/fix commit will then show how the behavior changed,
122
+
making it clearer to reviewrs and the community and showing people that the
123
+
test is verifying the expected state.
124
+
- e.g. [clap#5520](https://github.com/clap-rs/clap/pull/5520)
125
+
126
+
Note that we are talking about ideals.
127
+
We understand having a clean history requires more advanced git skills;
128
+
feel free to ask us for help!
129
+
We might even suggest where it would work to be lax.
130
+
We also understand that editing some early commits may cause a lot of churn
131
+
with merge conflicts which can make it not worth editing all of the history.
132
+
133
+
For code organization, we recommend
134
+
- Grouping `impl` blocks next to their type (or trait)
135
+
- Grouping private items after the `pub` item that uses them.
136
+
- 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