|
1 | 1 | # Pull Requests |
| 2 | + |
| 3 | +## Table of Contents |
| 4 | + |
| 5 | +1. [Before Creating a PR](#before-creating-a-pr) |
| 6 | +2. [Creating a PR](#creating-a-pr) |
| 7 | + * [PR Title](#pr-title) |
| 8 | + * [PR Summary](#pr-summary) |
| 9 | + * [Formatting, Linting, Etc.](#formatting-linting-etc) |
| 10 | + * [Tests](#tests) |
| 11 | + |
| 12 | +## Before Creating a PR |
| 13 | + |
| 14 | +Before you create a PR, we ask that you do the following: |
| 15 | + |
| 16 | +1. **If fixing a bug, make an issue first**: The issue tracker should have a searchable history of |
| 17 | +bugs reports. |
| 18 | + |
| 19 | +2. **If adding a feature, make an issue or discussion first**: Features should be discussed prior to implementation. |
| 20 | + |
| 21 | +## Creating a PR |
| 22 | + |
| 23 | +There are two additional documents covering more substantial contributions: |
| 24 | + |
| 25 | +* [Creating a new file type](NEW_FILE.md) |
| 26 | +* [Creating a new tag type](NEW_TAG.md) |
| 27 | + |
| 28 | +The rest of this document covers general PR procedures. |
| 29 | + |
| 30 | +### PR Title |
| 31 | + |
| 32 | +See [Issue Title](ISSUES.md#issue-title). |
| 33 | + |
| 34 | +### PR Summary |
| 35 | + |
| 36 | +Please provide a description of the change(s) made, unless they can be easily inferred from the title. |
| 37 | +This should only provide a brief overview of the implementation details, with relevant links to specifications, |
| 38 | +issues, etc. |
| 39 | + |
| 40 | +Also be sure to mention the issue associated with the PR like so: "closes #10". |
| 41 | + |
| 42 | +### Formatting, Linting, Etc. |
| 43 | + |
| 44 | +Lofty uses the traditional tools `rustfmt`, `clippy`, and `rustdoc` to keep a consistent style and maintain |
| 45 | +correctness. |
| 46 | + |
| 47 | +Prior to finalizing a PR, it is a good idea to run `cargo fmt`, `cargo clippy`, and `cargo doc` to ensure |
| 48 | +there are no errors. These commands are also run in CI using the latest stable Rust. |
| 49 | + |
| 50 | +### Tests |
| 51 | + |
| 52 | +It is incredibly important that a PR provides tests for any behavioral changes. |
| 53 | + |
| 54 | +* When fixing a bug, create a test that mirrors the reproducer provided in the issue. |
| 55 | +* When adding a feature, create tests for any new additions made where sensible |
0 commit comments