aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2018-03-10 20:27:38 -0800
committerZeyla Hellyer <[email protected]>2018-03-10 20:27:38 -0800
commit61e30997a0c1ab7db6739c93c4f88c672c233908 (patch)
treed14ec7c142e585336d721cbe1e5160039d4e5529
parentBackport parts of 7d162b9 (diff)
downloadserenity-61e30997a0c1ab7db6739c93c4f88c672c233908.tar.xz
serenity-61e30997a0c1ab7db6739c93c4f88c672c233908.zip
Add a basic CONTRIBUTING.md
-rw-r--r--CONTRIBUTING.md80
1 files changed, 80 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..1a0d8d2
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,80 @@
+# Pull Requests
+
+Please post a comment on an existing issue if you'd like to work on it. Please
+post an issue prior to dedicating a large amount of time on a PR so it can be
+determined if the change is something that the community wants.
+
+There are going to (usually) be 3 primary branches:
+
+- `master`: Development branch of the _most recent_ majour version. For example,
+if the largest version is v0.5.3, then the v0.5.x series will be on this branch.
+Bugfixes, internal rewrites, documentation updates, new features, etc. go here
+so long as they do not introduce breaking changes.
+- `v0.Y.x`: Development branch of the _second most recent_ majour version. If
+the largest version is v0.5.X, then this will be the branch for bugfixes for the
+v0.4.x version series. Bugfixes from the `master` branch may be backported here
+if applicable.
+- `v0.Z.x`: Development branch of the _next_ majour version. Following the same
+example, this would be for the v0.6.x version series. This is where breaking
+changes go.
+
+### Testing
+
+Make sure you run tests via `cargo test --all-features` prior to submitting a
+PR, and updating any of the examples in the `examples` directory where
+applicable.
+
+# Issues
+
+For bug reports, please include the following information where applicable:
+
+```
+Serenity version:
+
+Rust version (`rustc -V`):
+
+Backtrace (make sure to run `RUST_BACKTRACE=1`):
+
+Minimal test case if possible:
+```
+
+For feature requests or other requests, please just be as descriptive as
+possible, potentially with a code sample of what it might look like.
+
+# Code Style
+
+We don't follow rustfmt because it often produces unreadable results.
+
+Generally, there are a few rules to note, the rest should be grokable from
+existing rules:
+
+Add an empty line before and after logical blocks, but only if there code before
+or after it. For example:
+
+```rust
+fn foo() {
+ let x = true;
+
+ if x {
+ println!("x is true");
+ }
+
+ let y = 1u64;
+
+ match y {
+ 1 => println!("y is 1"),
+ other => println!("y is not 1, it is {}", other),
+ }
+}
+```
+
+Add an empty line after the subject line in documentation. For example:
+
+```rust
+/// This is the subject.
+///
+/// This is more detailed information.
+///
+/// Note the empty line after the subject, and between paragraphs.
+fn foo() { }
+```