mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
linter 0.1.113
Change-Id: I75cc9478171de15df24bc5addfa0aca4dcf7e97a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139660 Commit-Queue: Phil Quitslund <pquitslund@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
2cfa00791a
commit
0e0d4fb76b
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -152,13 +152,13 @@ additional details see the [announcement].
|
|||
|
||||
#### Linter
|
||||
|
||||
The Linter was updated to `0.1.112`, which includes:
|
||||
The Linter was updated to `0.1.113`, which includes:
|
||||
|
||||
* new lint: `use_raw_strings`
|
||||
* new lint: `unnecessary_raw_strings`
|
||||
* new lint: `avoid_escaping_inner_quotes`
|
||||
* new lint: `unnecessary_string_escapes`
|
||||
* incompatible rule documentation improvements
|
||||
* updated documentation links
|
||||
* `one_member_abstracts` updated to not lint classes with mixins or implementing interfaces
|
||||
* `unnecessary_getters_setters` fixed to ignore cases where a getter/setter is deprecated
|
||||
* new lint: `leading_newlines_in_multiline_strings`
|
||||
* improved highlight ranges for `avoid_private_typedef_functions` and `avoid_returning_null_for_future`
|
||||
|
||||
#### Analyzer
|
||||
|
||||
|
|
2
DEPS
2
DEPS
|
@ -102,7 +102,7 @@ vars = {
|
|||
"intl_tag": "0.15.7",
|
||||
"jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
|
||||
"json_rpc_2_tag": "2.0.9",
|
||||
"linter_tag": "0.1.112",
|
||||
"linter_tag": "0.1.113",
|
||||
"logging_tag": "0.11.3+2",
|
||||
"markupsafe_rev": "8f45f5cfa0009d2a70589bcda0349b8cb2b72783",
|
||||
"markdown_tag": "2.1.1",
|
||||
|
|
|
@ -28,20 +28,19 @@ class InlineTypedef extends CorrectionProducer {
|
|||
TypeAnnotation returnType;
|
||||
TypeParameterList typeParameters;
|
||||
List<FormalParameter> parameters;
|
||||
if (node is FunctionTypeAlias) {
|
||||
var typedef = node as FunctionTypeAlias;
|
||||
returnType = typedef.returnType;
|
||||
name = typedef.name.name;
|
||||
typeParameters = typedef.typeParameters;
|
||||
parameters = typedef.parameters.parameters;
|
||||
} else if (node is GenericTypeAlias) {
|
||||
var typedef = node as GenericTypeAlias;
|
||||
if (typedef.typeParameters != null) {
|
||||
var parent = node.parent;
|
||||
if (parent is FunctionTypeAlias) {
|
||||
returnType = parent.returnType;
|
||||
name = parent.name.name;
|
||||
typeParameters = parent.typeParameters;
|
||||
parameters = parent.parameters.parameters;
|
||||
} else if (parent is GenericTypeAlias) {
|
||||
if (parent.typeParameters != null) {
|
||||
return;
|
||||
}
|
||||
var functionType = typedef.functionType;
|
||||
var functionType = parent.functionType;
|
||||
returnType = functionType.returnType;
|
||||
name = typedef.name.name;
|
||||
name = parent.name.name;
|
||||
typeParameters = functionType.typeParameters;
|
||||
parameters = functionType.parameters.parameters;
|
||||
} else {
|
||||
|
@ -57,7 +56,7 @@ class InlineTypedef extends CorrectionProducer {
|
|||
// Build the edit.
|
||||
//
|
||||
await builder.addFileEdit(file, (DartFileEditBuilder builder) {
|
||||
builder.addDeletion(utils.getLinesRange(range.node(node)));
|
||||
builder.addDeletion(utils.getLinesRange(range.node(parent)));
|
||||
builder.addReplacement(range.node(finder.reference),
|
||||
(DartEditBuilder builder) {
|
||||
if (returnType != null) {
|
||||
|
|
Loading…
Reference in a new issue