diff options
| author | Josh Triplett <josh@joshtriplett.org> | 2023-06-22 13:12:43 -0700 |
|---|---|---|
| committer | Josh Triplett <josh@joshtriplett.org> | 2023-06-22 13:13:48 -0700 |
| commit | 20f2828bbd37ce3d91797a2f2243c76190856301 (patch) | |
| tree | 20c9d5cb9e2c93ee503f723b3dc80c35b943a583 /src/doc | |
| parent | c5f8b2c7a92bc542c0c2666dc4672493cf945982 (diff) | |
style-guide: Update cargo.md for authors being optional and not recommended
Change an example using the authors field to use a long feature list instead. Change the conventions for the authors field to say "if present".
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/style-guide/src/cargo.md | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/doc/style-guide/src/cargo.md b/src/doc/style-guide/src/cargo.md index 13b96ca8c5e..5e6a62a7fd2 100644 --- a/src/doc/style-guide/src/cargo.md +++ b/src/doc/style-guide/src/cargo.md @@ -25,16 +25,17 @@ not indent any key names; start all key names at the start of a line. Use multi-line strings (rather than newline escape sequences) for any string values that include multiple lines, such as the crate description. -For array values, such as a list of authors, put the entire list on the same +For array values, such as a list of features, put the entire list on the same line as the key, if it fits. Otherwise, use block indentation: put a newline after the opening square bracket, indent each item by one indentation level, put a comma after each item (including the last), and put the closing square bracket at the start of a line by itself after the last item. ```rust -authors = [ - "A Uthor <a.uthor@example.org>", - "Another Author <author@example.net>", +some_feature = [ + "another_feature", + "yet_another_feature", + "some_dependency?/some_feature", ] ``` @@ -54,11 +55,11 @@ version = "4.5.6" ## Metadata conventions -The authors list should consist of strings that each contain an author name -followed by an email address in angle brackets: `Full Name <email@address>`. -It should not contain bare email addresses, or names without email addresses. -(The authors list may also include a mailing list address without an associated -name.) +The authors list, if present, should consist of strings that each contain an +author name followed by an email address in angle brackets: `Full Name +<email@address>`. It should not contain bare email addresses, or names without +email addresses. (The authors list may also include a mailing list address +without an associated name.) The license field must contain a valid [SPDX expression](https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60), |
