-
Notifications
You must be signed in to change notification settings - Fork 125
Support URIs in part-of directives. #626
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# 1.0.6 | ||
|
||
* Support URIs in part-of directives (#615). | ||
|
||
# 1.0.5 | ||
|
||
* Support the latest version of `pkg/analyzer`. | ||
|
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,6 +1,6 @@ | ||
name: dart_style | ||
# Note: See tool/grind.dart for how to bump the version. | ||
version: 1.0.5 | ||
version: 1.0.6 | ||
author: Dart Team <[email protected]> | ||
description: Opinionated, automatic Dart source code formatter. | ||
homepage: https://github.com/dart-lang/dart_style | ||
|
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 |
---|---|---|
@@ -0,0 +1,98 @@ | ||
40 columns | | ||
>>> many parameters | ||
Function(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, | ||
tenth, eleventh, twelfth) f; | ||
<<< | ||
Function( | ||
first, | ||
second, | ||
third, | ||
fourth, | ||
fifth, | ||
sixth, | ||
seventh, | ||
eighth, | ||
ninth, | ||
tenth, | ||
eleventh, | ||
twelfth) f; | ||
>>> parameters fit but ) does not | ||
Function(int firstArgume, int argumentTo) f; | ||
<<< | ||
Function( | ||
int firstArgume, int argumentTo) f; | ||
>>> keep mandatory and positional on same line | ||
Function(param, [foo, bar]) f; | ||
<<< | ||
Function(param, [foo, bar]) f; | ||
>>> keep mandatory and named on same line | ||
Function(param, {T foo, T bar}) f; | ||
<<< | ||
Function(param, {T foo, T bar}) f; | ||
>>> move just optional positional to second line even though all fit on second | ||
Function(parameter, [int foo, String bar]) f; | ||
<<< | ||
Function(parameter, | ||
[int foo, String bar]) f; | ||
>>> move just named to second line even though all fit on second | ||
Function(parameter, {int foo, String bar}) f; | ||
<<< | ||
Function(parameter, | ||
{int foo, String bar}) f; | ||
>>> avoid splitting in function type parameters | ||
Function(parameter1, void printFn(param1, param2)) f; | ||
<<< | ||
Function(parameter1, | ||
void printFn(param1, param2)) f; | ||
>>> allow splitting in function type parameters | ||
Function(v callback(parameter1, parameter2, parameter3, parameter4)) f; | ||
<<< | ||
Function( | ||
v callback(parameter1, parameter2, | ||
parameter3, parameter4)) f; | ||
>>> split optional onto one per line if they don't fit on one line | ||
Function([parameter1, parameter2, parameter3]) f; | ||
<<< | ||
Function( | ||
[parameter1, | ||
parameter2, | ||
parameter3]) f; | ||
>>> split between type and name | ||
Function(VerylongParameterType parameterName) f; | ||
<<< | ||
Function( | ||
VerylongParameterType | ||
parameterName) f; | ||
>>> split in function type and on variable name | ||
Function(VeryVeryVeryVeryLongParameterType) veryLongVariableName; | ||
<<< | ||
Function( | ||
VeryVeryVeryVeryLongParameterType) | ||
veryLongVariableName; | ||
>>> split in nested function type forces outer split | ||
Function(int, String, Function(parameter1, parameter2, parameter3)) f; | ||
<<< | ||
Function( | ||
int, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nit] this is misleading... IIUC this is a parameter named 'int' of type 'dynamic'. Or am I wrong? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above. |
||
String, | ||
Function(parameter1, parameter2, | ||
parameter3)) f; | ||
>>> split in type arguments and variable | ||
Function<Parameter1, Parameter2, Parameter3>() veryVeryLongVariableName; | ||
<<< | ||
Function<Parameter1, Parameter2, | ||
Parameter3>() | ||
veryVeryLongVariableName; | ||
>>> split after return type | ||
GenericClass<Parameter1, Parameter2> Function() f; | ||
<<< | ||
GenericClass<Parameter1, Parameter2> | ||
Function() f; | ||
>>> chained return types | ||
Function<Argument>(String) Function<Argument>(num) Function<Argument>(int) Function<Argument>(bool) longVariable; | ||
<<< | ||
Function<Argument>(String) | ||
Function<Argument>(num) | ||
Function<Argument>(int) | ||
Function<Argument>(bool) | ||
longVariable; |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
40 columns | | ||
>>> part of with uri that fits | ||
part of "uri.dart"; | ||
<<< | ||
part of "uri.dart"; | ||
>>> part of with uri does not split on long line | ||
part of "very_very_very_very_long_uri.dart"; | ||
<<< | ||
part of "very_very_very_very_long_uri.dart"; |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
40 columns | | ||
>>> | ||
Function ( ) f; | ||
<<< | ||
Function() f; | ||
>>> | ||
void Function( int i, String s) f; | ||
<<< | ||
void Function(int i, String s) f; | ||
>>> | ||
Function( int i, [ String s, bool b ] ) f; | ||
<<< | ||
Function(int i, [String s, bool b]) f; | ||
>>> | ||
Function( int i, { String s, bool b } ) f; | ||
<<< | ||
Function(int i, {String s, bool b}) f; | ||
>>> | ||
Function < T extends S > () f; | ||
<<< | ||
Function<T extends S>() f; |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] this isn't a VeryVeryVeryVeryLongParameterType it's a veryVeryVeryVeryLongParameterName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is actually a type (though it doesn't matter either way for this test). Unlike the old function type syntax, the new syntax wisely assumes if you omit one identifier, you're omitting the name, not the type.