Skip to content

Commit be36d32

Browse files
committed
CONTRIBUTING: Add docs for creating PRs
1 parent ffa4d92 commit be36d32

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,10 @@ Issues serve two purposes:
1010
For any questions, you should use [the Q&A discussions page](https://github.com/Serial-ATA/lofty-rs/discussions/categories/q-a).
1111

1212
## [Pull Requests](doc/PULL_REQUESTS.md)
13+
14+
[Creating a PR](doc/PULL_REQUESTS.md#creating-a-pr)
15+
16+
For major contributions:
17+
18+
* [Creating a new file type](doc/NEW_FILE.md)
19+
* [Creating a new tag type](doc/NEW_TAG.md)

doc/PULL_REQUESTS.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,55 @@
11
# 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

Comments
 (0)