Skip to content

Commit 0201044

Browse files
committedFeb 3, 2018
chore: add OSS boilerplate
1 parent 2e9fe4a commit 0201044

File tree

2 files changed

+201
-0
lines changed

2 files changed

+201
-0
lines changed
 

‎CODE_OF_CONDUCT.md

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [eliza@elizas.website]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

‎CONTRIBUTING.md

+127
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Contributing to SHELF
2+
3+
**Looking for a first issue?** You might want to start out by looking at
4+
issues tagged "good first issue". These are issues that, while important,
5+
will probably require less context regarding the SHELF codebase and
6+
should make good jumping-off points for potential contibutors. Furthermore,
7+
issues tagged as "easy" as well as "good first issue" are likely to be the
8+
most well-suited for Rust beginners.
9+
10+
## Table of Contents
11+
12+
+ [What do I need to know before contributing?](#what-do-i-need-to-know-before-contributing)
13+
- [Code of Conduct](#code-of-conduct)
14+
- [Licensing](#licensing)
15+
+ [Conventions & Style Guides](#conventions--style-guides)
16+
- [Git Conventions](#git-conventions)
17+
* [Pull Requests](#pull-requests)
18+
* [Commit Messages](#commit-messages)
19+
- [Coding Style](#coding-style)
20+
* [Tools to assist with coding style](#tools-to-assist-with-coding-style)
21+
22+
## What do I need to know before contributing?
23+
24+
### Code of Conduct
25+
26+
This project adheres to the Contributor Covenant [code of conduct].
27+
By participating, you are expected to uphold this code.
28+
Please report unacceptable behavior to [eliza@elizas.website].
29+
30+
[code of conduct]: CODE_OF_CONDUCT.md
31+
[eliza@elizas.website]: mailto:eliza@elizas.website
32+
33+
### Licensing
34+
35+
SHELF is licensed under the [MIT](LICENSE) open-source license. By contributing
36+
code to SHELF, you agree to waive all copyright claims on your contribution
37+
and allow it to be distributed under this license.
38+
39+
## Conventions & Style Guides
40+
41+
### Git Conventions
42+
43+
#### Pull requests
44+
45+
In order to be accepted and merged, a pull request must meet the following conditions.
46+
47+
##### Pull requests MUST
48+
49+
+ Build successfully on [Travis](https://travis-ci.org/hawkw/alarm)
50+
+ Include RustDoc comments for any public-facing API functions or types
51+
+ Include tests for any added features
52+
+ Reference any closed issues with the text "Closes #XX" or "Fixes #XX" in the pull request description
53+
54+
##### Pull requests MUST NOT
55+
56+
+ Include any failing tests.
57+
+ Have any outstanding changes requested by a reviewer.
58+
59+
#### Commit messages
60+
61+
Commit messages should follow the [Angular.js Commit Message Conventions](https://github.com/conventional-changelog/conventional-changelog/blob/a5505865ff3dd710cf757f50530e73ef0ca641da/conventions/angular.md). We use [`clog`](https://github.com/clog-tool/clog-cli) for automatically generating changelogs, and commit messages must be in a format that `clog` can parse.
62+
63+
It is recommended that contributors read the linked documentation for the Angular commit message convention in full –– it's not that long. For the impatient, here are some of the most important guidelines:
64+
65+
##### Commit messages MUST
66+
67+
+ Be in present tense
68+
+ Follow the form `<type>(<scope>): <subject>`
69+
+ where `<type>` is one of:
70+
* **feat**: A new feature
71+
* **fix**: A bug fix
72+
* **docs**: Documentation only changes
73+
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
74+
semi-colons, etc)
75+
* **refactor**: A code change that neither fixes a bug or adds a feature
76+
* **perf**: A code change that improves performance
77+
* **test**: Adding missing tests
78+
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
79+
generation
80+
+ and `<scope>` (optionally) specifies the specific element or component of the project that was changed.
81+
82+
##### Commit messages MUST NOT
83+
84+
+ Include lines exceeding 100 characters
85+
86+
##### Commit messages MAY
87+
88+
+ Include the text `[skip ci]` if changing non-Rustdoc documentation.
89+
+ This will cause Travis CI to skip building that commit.
90+
+ Commits which change RustDoc documentation in `.rs` source code files
91+
should still be built on CI -- `[skip ci]` should only be used for commits
92+
which change external documentation files such as `README.md`
93+
+ Commits which change configuration files for tools not used by Travis may
94+
also skip the CI build, at the discretion of the committer.
95+
96+
97+
### Code Style
98+
99+
Rust code should:
100+
+ Follow the [Rust style guidelines](https://github.com/rust-lang/rust/tree/master/src/doc/style/style) and the guidelines in the ["Effective Rust" section](https://doc.rust-lang.org/book/effective-rust.html) of the Rust Book, except when contradicted by this document.
101+
+ In particular, it should...
102+
+ ...be indented with 4 spaces
103+
+ ...not end files with trailing whitespace
104+
+ ...follow the [Rust naming conventions](https://github.com/rust-lang/rust/tree/master/src/doc/style/style/)
105+
+ Not exceed 80 characters per line.
106+
107+
### Tools to Assist With Coding Style
108+
109+
#### rustfmt
110+
111+
[`rustfmt`](https://github.com/rust-lang-nursery/rustfmt) is a tool for automatically formatting Rust source code according to style guidelines. This repository provides a [`rustfmt.toml`](rustfmt.toml) file for automatically configuring `rustfmt` to use our style guidelines.
112+
113+
`rustfmt` may be installed by running
114+
115+
```bash
116+
cargo install rustfmt
117+
```
118+
119+
and invoked on a crate by running
120+
121+
```bash
122+
cargo fmt
123+
```
124+
125+
Additionally, there are `rustfmt` plugins [available](https://github.com/rust-lang-nursery/rustfmt#running-rustfmt-from-your-editor) for many popular editors and IDEs.
126+
127+
`rustfmt` may also be added as a [git pre-commit hook](https://git-scm.com/book/uz/v2/Customizing-Git-Git-Hooks) to ensure that all commits conform to the style guidelines.

0 commit comments

Comments
 (0)
Please sign in to comment.