-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #12836 - epage:fmt, r=weihanglo
docs(contrib): Policy on manifest editing Based on https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Automatic.20edits.20to.20.60Cargo.2Ctoml.60
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Formatting | ||
|
||
When modifying user files, like `Cargo.toml`, we should not change other | ||
sections of the file, | ||
preserving the general formatting. | ||
This includes the table, inline-table, or array that a field is being edited in. | ||
|
||
When adding new entries, they do not need to match the canonical style of the | ||
document but can use the default formatting. | ||
If the entry is already sorted, preserving the sort order is preferred. | ||
|
||
When removing entries, | ||
comments on the same line should be removed but comments on following lines | ||
should be preserved. | ||
|
||
Inconsistencies in style after making a change are left to the user and their | ||
preferred auto-formatter. |