-
Notifications
You must be signed in to change notification settings - Fork 892
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new DISABLE_SPLIT_LIST_WITH_COMMENT flag. (#1177)
`DISABLE_SPLIT_LIST_WITH_COMMENT` is a new knob that changes the behavior of splitting a list when a comment is present inside the list. Before, we split a list containing a comment just like we split a list containing a trailing comma: Each element goes on its own line (unless `DISABLE_ENDING_COMMA_HEURISTIC` is true). Now, if `DISABLE_SPLIT_LIST_WITH_COMMENT` is true, we do not split every element of the list onto a new line just because there's a comment somewhere in the list. This mirrors the behavior of clang-format, and is useful for e.g. forming "logical groups" of elements in a list. Note: Upgrading will result in a behavioral change if you have `DISABLE_ENDING_COMMA_HEURISTIC` in your config. Before this version, this flag caused us not to split lists with a trailing comma *and* lists that contain comments. Now, if you set only that flag, we *will* split lists that contain comments. Set the new `DISABLE_SPLIT_LIST_WITH_COMMENT` flag to true to preserve the old behavior.
- Loading branch information
Showing
5 changed files
with
150 additions
and
6 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
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
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