Skip to content

Commit

Permalink
Merge pull request rust-lang#213 from waldyrious/patch-1
Browse files Browse the repository at this point in the history
CONTRIBUTING.md: use context lines in diff blocks
  • Loading branch information
dtolnay authored Jan 19, 2020
2 parents 86bd10c + 1358cf5 commit 1b2c61d
Showing 1 changed file with 27 additions and 15 deletions.
42 changes: 27 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,43 @@ guidelines remains consistent and intelligible.
A guideline is an **indicative statement** about a hypothetical crate.

```diff
- Not an imperative like "Implement Hex, Octal, Binary for binary number types"
+ Instead: "Binary number types provide Hex, Octal, Binary formatting"

- Not an obligation like "Macros should compose well with attributes"
+ Instead: "Macros compose well with attributes"
Not an imperative like
- "Implement Hex, Octal, Binary for binary number types"
Instead:
+ "Binary number types provide Hex, Octal, Binary formatting"

Not an obligation like
- "Macros should compose well with attributes"
Instead:
+ "Macros compose well with attributes"
```

Guidelines have an explicit **subject** and **verb**.

```diff
- Not implicit subject like "Includes all common Cargo.toml metadata"
+ Instead: "Cargo.toml includes all common metadata"

- Not implicit verb like "Thoroughly documented with examples"
+ Instead: "Crate level docs are thorough and include examples"

- Not metaphysical like "There are no out-parameters"
+ Instead: "Functions do not take out-parameters"
Not implicit subject like
- "Includes all common Cargo.toml metadata"
Instead:
+ "Cargo.toml includes all common metadata"

Not implicit verb like
- "Thoroughly documented with examples"
Instead:
+ "Crate level docs are thorough and include examples"

Not metaphysical like
- "There are no out-parameters"
Instead:
+ "Functions do not take out-parameters"
```

Guidelines use **active voice**.

```diff
- Not passive voice like "Function arguments are validated"
+ Instead: "Functions validate their arguments"
Not passive voice like
- "Function arguments are validated"
Instead:
+ "Functions validate their arguments"
```

## Conduct
Expand Down

0 comments on commit 1b2c61d

Please sign in to comment.