diff --git a/_contrib/CODE_OF_CONDUCT.md b/_contrib/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..4126d90 --- /dev/null +++ b/_contrib/CODE_OF_CONDUCT.md @@ -0,0 +1,25 @@ +--- +title: Code of Conduct +layout: guide +hyper_path: docs/CODE_OF_CONDUCT.md +--- + +## Be Kind + +- Don't be mean. +- Insulting anyone is prohibited. +- Harassment of any kind is prohibited. +- If another person feels uncomfortable with your remarks, stop it. +- If a moderator deems your comment or conduct as inappropriate, stop it. +- Disagreeing is fine, but keep it to technical arguments. Never attack the person. +- Give the benefit of the doubt. Assume good intentions. +- Show empathy. There are 3 interpretations to any message: what we thought, what we said, and what they understand. +- This does mean we exclude people who are not kind. We are happy to make that sacrifice. + +## Or Else + +- Violations of the Code of Conduct will result in 1 warning. +- If the violation is major, a moderator may just ban immediately. +- If a warning has already been given, a moderator will ban the offender. +- There is no process for appealing a ban. +- Any violations can be reported to sean@seanmonstar.com. diff --git a/_contrib/CODE_STYLE.md b/_contrib/CODE_STYLE.md new file mode 100644 index 0000000..5cc671e --- /dev/null +++ b/_contrib/CODE_STYLE.md @@ -0,0 +1,26 @@ +--- +title: Code Style +layout: guide +hyper_path: docs/CODE_STYLE.md +--- + +hyper uses the default configuration of `rustfmt`. + +## cargo fmt + +`cargo fmt --all` does not work in hyper. Please use the following commands: + +```txt +# Mac or Linux +rustfmt --check --edition 2021 $(git ls-files '*.rs') + +# Powershell +Get-ChildItem . -Filter "*.rs" -Recurse | foreach { rustfmt --check --edition 2021 $_.FullName } +``` + +> **NOTE**: If you are using `rust-analyzer`, you can add the following two lines in your `settings.json` to make sure the features get taken into account when checking the project: +> +> ```json +> "rust-analyzer.cargo.features": ["full"], +> "rust-analyzer.check.features": ["full"], +> ``` diff --git a/_contrib/COMMITS.md b/_contrib/COMMITS.md new file mode 100644 index 0000000..0b1f4e9 --- /dev/null +++ b/_contrib/COMMITS.md @@ -0,0 +1,69 @@ +--- +title: Git Commit Guidelines +layout: guide +hyper_path: docs/COMMITS.md +--- + +We have very precise rules over how our git commit messages can be formatted. This leads to **more +readable messages** that are easy to follow when looking through the **project history**. But also, +we use the git commit messages to **generate the change log**. + +## Commit Message Format +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special +format that includes a **type**, a **scope** and a **subject**: + +``` +(): + + + +