|
| 1 | +# Contributing guide |
| 2 | + |
| 3 | +Thanks for your interest in contributing to this project! |
| 4 | +We very much look forward to |
| 5 | +your suggestions, |
| 6 | +bug reports, |
| 7 | +and pull requests. |
| 8 | + |
| 9 | +Note: |
| 10 | +This project and everyone participating in it is governed by |
| 11 | +[this Code of Conduct](CODE_OF_CONDUCT.md). |
| 12 | +By participating, you are expected to uphold this code. |
| 13 | + |
| 14 | +# Submitting bug reports |
| 15 | + |
| 16 | +Open an issue in which you: |
| 17 | + |
| 18 | +- Say which version of this library, the Rust compiler, and other dependencies (if relevant) you are using |
| 19 | +- Explain what you are trying to do |
| 20 | +- Try to provide a small, reproducible example of the issue. |
| 21 | + |
| 22 | +# Submitting feature requests |
| 23 | + |
| 24 | +First, |
| 25 | +please check the exising (open and closed) issues |
| 26 | +for one that already covers the feature you are proposing. |
| 27 | +If there is none, |
| 28 | +feel free to open an issue. |
| 29 | + |
| 30 | +In this issue, please describe |
| 31 | + |
| 32 | +- What you want to achive |
| 33 | +- How you imaging this library to help you with that |
| 34 | +- What needs to changed/added/removed to make this possible. |
| 35 | + |
| 36 | +Ideally, |
| 37 | +provide a list of criteria |
| 38 | +that needs to be met by a future version of this library |
| 39 | +so you can use this feature. |
| 40 | + |
| 41 | +# Submitting a pull request |
| 42 | + |
| 43 | +Do you want to submit a quick typo fix or something similar? |
| 44 | +No need to read further, just send a PR! |
| 45 | +Thanks! |
| 46 | + |
| 47 | +Before starting to work on anything non-trivial, |
| 48 | +please make sure that: |
| 49 | + |
| 50 | +- There is an existing issue describing the feature |
| 51 | +- The maintainers agree that this should be implemented |
| 52 | +- Nobody else is working on this |
| 53 | + |
| 54 | +In general, |
| 55 | +it's a good idea to let somebody know |
| 56 | +that you are working on a feature |
| 57 | +before sending a PR. |
| 58 | + |
| 59 | +Many of our issues cover multiple aspects, |
| 60 | +and it doesn't always make sense |
| 61 | +to implement everything in one single PR. |
| 62 | +Please nevertheless try to include something like |
| 63 | +`Addresses part of #42` |
| 64 | +(where `#42` is the issue this feature is described in) |
| 65 | +in your PR description and/or commit messages. |
| 66 | + |
| 67 | +## Required setup |
| 68 | + |
| 69 | +To work on this project, you'll need |
| 70 | + |
| 71 | +- At least a beginner level understanding of Rust. |
| 72 | + If this is the first Rust project you contribute to, |
| 73 | + we recommend you read some of the [freely available documentation][rust-docs] first. |
| 74 | +- A recent Rust compiler and working cargo |
| 75 | + - Also see the section on code style and CI for additional tools |
| 76 | +- A Github account and working knowledge of git |
| 77 | +- Basic communication skills in English |
| 78 | + |
| 79 | +[rust-docs]: https://doc.rust-lang.org/ |
| 80 | + |
| 81 | +## Code style |
| 82 | + |
| 83 | +Every PR is checked by a continuous integration system, which |
| 84 | +compiles the code (`cargo build`), |
| 85 | +run all the tests (`cargo test`), |
| 86 | +checks code formatting (`cargo fmt`), |
| 87 | +and checks various lints (`cargo clippy`). |
| 88 | + |
| 89 | +You can see the full test suite in [this file][ci]. |
| 90 | +It makes sense to run all of this locally |
| 91 | +before submitting your pull requests or updates to it. |
| 92 | + |
| 93 | +[ci]: .travis.yml |
| 94 | + |
| 95 | +## Commit messages |
| 96 | + |
| 97 | +Your commits and their messages |
| 98 | +are what separates total confusion |
| 99 | +and easily recognizable indent behind a change |
| 100 | +in six months. |
| 101 | + |
| 102 | +Please write them in a very explicit mannor, |
| 103 | +and above all describe the indent behind the change you make. |
| 104 | +They should be written in full English sentences |
| 105 | +and contain examples for usages |
| 106 | +as well as describe what you tried to do |
| 107 | +and what didn't work. |
| 108 | +It's totally fine to write multiple paragraphs for a very small diff. |
| 109 | + |
| 110 | +A commit should be no longer than 200 lines of diff |
| 111 | +without a good and explicitly stated reason. |
| 112 | +It's recommended to separate larger pull requests |
| 113 | +into many small commits |
| 114 | +that build upon each other. |
| 115 | + |
| 116 | +## What then? |
| 117 | + |
| 118 | +After submitting your pull request, |
| 119 | +it's our turn! |
| 120 | + |
| 121 | +Please bear with us as we try to review your code, |
| 122 | +we tend to be quite busy |
| 123 | +and this is not the only open source project we maintain. |
| 124 | +If no maintainer as responsed after a week, |
| 125 | +feel free to ping them by writing a comment, |
| 126 | +or reaching out to them on other channels. |
| 127 | + |
| 128 | +Usually, |
| 129 | +you'll get some feedback in the form |
| 130 | +of comments on the code |
| 131 | +or the general architecture of the implementation. |
| 132 | +Please push any changes you make |
| 133 | +after the first round of feedback |
| 134 | +as new commits to the same branch. |
| 135 | + |
| 136 | +- - - |
| 137 | + |
| 138 | +We're very much looking forward to your contributions! |
0 commit comments