-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweak block argument heuristics (#1548)
Change the block format heuristics. This produces output that better matches what users expected in the associated issues. I think it also looks better in the affected regression tests. And I ran this on a large corpus and looking at the diffs, these rules seem to be much better across the board. The new rules are basically: * A block formatted argument list can't end up with named arguments on multiple lines. * Only one trailing argument is allowed after the block argument. The existing rules are also kept: * Prefer a function block argument over a collection one. * Only allow a single block argument. * Allow the first argument to be adjacent strings with a later function block argument (to handle stuff like test() and group()). Fix #1527. Fix #1528. Fix #1543.
- Loading branch information
1 parent
494a1d7
commit 05d08d9
Showing
22 changed files
with
604 additions
and
267 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
Oops, something went wrong.