-
Notifications
You must be signed in to change notification settings - Fork 13.4k
style-guide: Organizational and editing tweaks (no semantic changes) #112942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
3747d7f
style-guide: Move text about block vs visual indent to indentation se…
joshtriplett 9280567
style-guide: Move and expand text about trailing commas
joshtriplett 2c0dd90
style-guide: s/right-ward/rightward/
joshtriplett 4c5bb06
style-guide: Consistently refer to rustfmt as `rustfmt`
joshtriplett d270af3
style-guide: Remove inaccurate statement about rustfmt
joshtriplett c5f8b2c
style-guide: Define (and capitalize) "ASCIIbetically"
joshtriplett 20f2828
style-guide: Update cargo.md for authors being optional and not recom…
joshtriplett 6f8f83f
style-guide: Avoid normative recommendations for formatting tool conf…
joshtriplett fec28b2
style-guide: Clarify advice on names matching keywords
joshtriplett c930b21
style-guide: Reword an awkwardly phrased recommendation (and fix a typo)
joshtriplett 3e2449c
style-guide: Rephrase a confusingly ordered, ambiguous sentence (and …
joshtriplett a9d1db3
style-guide: Avoid hyphenating "semicolon"
joshtriplett 5d63721
style-guide: Make link text in SUMMARY.md match the headings in the l…
joshtriplett f972e09
style-guide: Define what an item is
joshtriplett fcc23a3
style-guide: Avoid referring to the style team in the past tense
joshtriplett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Cargo.toml conventions | ||
# `Cargo.toml` conventions | ||
|
||
## Formatting conventions | ||
|
||
|
@@ -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 <[email protected]>", | ||
"Another Author <[email protected]>", | ||
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), | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.