Skip to content

Commit

Permalink
Version 2.14.0-122.0.dev
Browse files Browse the repository at this point in the history
Merge commit 'df5d0a5f4e321a6b0ffaa58815e8694f44c8c583' into 'dev'
  • Loading branch information
Dart CI committed May 18, 2021
2 parents 4f0a08c + df5d0a5 commit 510f264
Show file tree
Hide file tree
Showing 45 changed files with 798 additions and 375 deletions.
8 changes: 7 additions & 1 deletion .dart_tool/package_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"constraint, update this by running tools/generate_package_config.dart."
],
"configVersion": 2,
"generated": "2021-05-11T11:47:02.674706",
"generated": "2021-05-17T10:34:01.378194",
"generator": "tools/generate_package_config.dart",
"packages": [
{
Expand Down Expand Up @@ -412,6 +412,12 @@
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "lints",
"rootUri": "../third_party/pkg/lints",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "logging",
"rootUri": "../third_party/pkg/logging",
Expand Down
1 change: 1 addition & 0 deletions .packages
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ js_runtime:pkg/js_runtime/lib
json_rpc_2:third_party/pkg/json_rpc_2/lib
kernel:pkg/kernel/lib
linter:third_party/pkg/linter/lib
lints:third_party/pkg/lints/lib
logging:third_party/pkg/logging/lib
markdown:third_party/pkg/markdown/lib
matcher:third_party/pkg/matcher/lib
Expand Down
73 changes: 35 additions & 38 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,41 +182,40 @@ Updated the Linter to `1.4.0`, which includes:
#### `dart:collection`
- The `SplayTreeMap` was changed to allow `null` as key if the `compare`
function allows it. It now checks that a new key can be used as an
argument to the `compare` function when the member is added,
*even if the map is empty* (in which case it just compares the key
to itself).
- The `SplayTreeSet` was changed to checks that a new element can be used as an
argument to the `compare` function when the member is added,
*even if the set is empty* (in which case it just compares the element
to itself).
* The `SplayTreeMap` was changed to allow `null` as key if the `compare`
function allows it. It now checks that a new key can be used as an argument
to the `compare` function when the member is added, *even if the map is
empty* (in which case it just compares the key to itself).
* The `SplayTreeSet` was changed to checks that a new element can be used as
an argument to the `compare` function when the member is added, *even if the
set is empty* (in which case it just compares the element to itself).
#### `dart:developer`
- Added `serverWebSocketUri` property to `ServiceProtocolInfo`.
* Added `serverWebSocketUri` property to `ServiceProtocolInfo`.
### Dart VM
### Tools
#### Analyzer
- Static analyses with "error" severity can once again be ignored with
comments like `// ignore: code` and `// ignore_for_file: code`. To declare
that certain analysis codes, or codes with certain severities ("error",
"warning", and "info") cannot be ignored with such comments, list them in
`analysis_options.yaml`, under the `analyzer` heading, with a new YAML key,
`cannot-ignore`. For example, to declare that "error" codes and
`unused_import` cannot be ignored, write the following into
`analysis_options.yaml`:
```yaml
analyzer:
cannot-ignore:
- error
- unused_import
```
* Static analyses with "error" severity can once again be ignored with
comments like `// ignore: code` and `// ignore_for_file: code`. To declare
that certain analysis codes, or codes with certain severities ("error",
"warning", and "info") cannot be ignored with such comments, list them in
`analysis_options.yaml`, under the `analyzer` heading, with a new YAML key,
`cannot-ignore`. For example, to declare that "error" codes and
`unused_import` cannot be ignored, write the following into
`analysis_options.yaml`:
```yaml
analyzer:
cannot-ignore:
- error
- unused_import
```
#### dart format
Expand All @@ -227,19 +226,17 @@ Updated the Linter to `1.4.0`, which includes:
Updated the Linter to `1.2.1`, which includes:
- improvements to `iterable_contains_unrelated_type` to better support `List`
content checks.
- fixes to `camel_case_types` and `prefer_mixin` to support non-function
type aliases.
- fixed `prefer_mixin` to properly make exceptions for `dart.collection`
legacy mixins.
- new lint: `use_build_context_synchronously` (experimental).
- new lint: `avoid_multiple_declarations_per_line`.
- full library migration to null-safety.
- new lint: `use_if_null_to_convert_nulls_to_bools`.
- new lint: `deprecated_consistency`.
- new lint: `use_named_constants`.
- deprecation of `avoid_as`.
* Improved `iterable_contains_unrelated_type` to better support `List` content
checks.
* Fixed `camel_case_types` and `prefer_mixin` to support non-function type
aliases.
* Fixed `prefer_mixin` to properly make exceptions for `dart.collection`
legacy mixins.
* Added new lints `avoid_multiple_declarations_per_line`,
`use_if_null_to_convert_nulls_to_bools`, `deprecated_consistency`,
`use_named_constants`, `use_build_context_synchronously` (experimental).
* Deprecated `avoid_as`.
* Migrated library to null-safety.
### Other libraries
Expand Down
3 changes: 3 additions & 0 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ vars = {
"jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
"json_rpc_2_rev": "7e00f893440a72de0637970325e4ea44bd1e8c8e",
"linter_tag": "1.4.0",
"lints_tag": "f9670df2a66e0ec12eb51554e70c1cbf56c8f5d0",
"logging_rev": "e2f633b543ef89c54688554b15ca3d7e425b86a2",
"markupsafe_rev": "8f45f5cfa0009d2a70589bcda0349b8cb2b72783",
"markdown_rev": "9c4beaac96d8f008078e00b027915f81b665d2de",
Expand Down Expand Up @@ -391,6 +392,8 @@ deps = {
Var("dart_git") + "json_rpc_2.git" + "@" + Var("json_rpc_2_rev"),
Var("dart_root") + "/third_party/pkg/linter":
Var("dart_git") + "linter.git" + "@" + Var("linter_tag"),
Var("dart_root") + "/third_party/pkg/lints":
Var("dart_git") + "lints.git" + "@" + Var("lints_tag"),
Var("dart_root") + "/third_party/pkg/logging":
Var("dart_git") + "logging.git" + "@" + Var("logging_rev"),
Var("dart_root") + "/third_party/pkg/markdown":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class AddMissingRequiredArgumentTest extends FixProcessorTest {
Future<void> test_constructor_flutter_children() async {
await resolveTestCode('''
import 'package:flutter/widgets.dart';
import 'package:meta/meta.dart';
class MyWidget extends Widget {
MyWidget({@required List<Widget> children});
Expand All @@ -45,7 +44,6 @@ build() {
''');
await assertHasFix('''
import 'package:flutter/widgets.dart';
import 'package:meta/meta.dart';
class MyWidget extends Widget {
MyWidget({@required List<Widget> children});
Expand All @@ -60,7 +58,6 @@ build() {
Future<void> test_constructor_flutter_hasTrailingComma() async {
await resolveTestCode('''
import 'package:flutter/widgets.dart';
import 'package:meta/meta.dart';
class MyWidget extends Widget {
MyWidget({@required int a, @required int b});
Expand All @@ -72,7 +69,6 @@ build() {
''');
await assertHasFix('''
import 'package:flutter/widgets.dart';
import 'package:meta/meta.dart';
class MyWidget extends Widget {
MyWidget({@required int a, @required int b});
Expand Down Expand Up @@ -335,7 +331,6 @@ main() {
Future<void> test_param_child() async {
await resolveTestCode('''
import 'package:flutter/widgets.dart';
import 'package:meta/meta.dart';
class MyWidget extends Widget {
MyWidget({@required String foo, @required Widget child});
Expand All @@ -349,7 +344,6 @@ build() {
''');
await assertHasFix('''
import 'package:flutter/widgets.dart';
import 'package:meta/meta.dart';
class MyWidget extends Widget {
MyWidget({@required String foo, @required Widget child});
Expand All @@ -367,7 +361,6 @@ build() {
Future<void> test_param_children() async {
await resolveTestCode('''
import 'package:flutter/widgets.dart';
import 'package:meta/meta.dart';
class MyWidget extends Widget {
MyWidget({@required String foo, @required List<Widget> children});
Expand All @@ -381,7 +374,6 @@ build() {
''');
await assertHasFix('''
import 'package:flutter/widgets.dart';
import 'package:meta/meta.dart';
class MyWidget extends Widget {
MyWidget({@required String foo, @required List<Widget> children});
Expand Down
1 change: 1 addition & 0 deletions pkg/analyzer/lib/error/error.dart
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ const List<ErrorCode> errorCodeValues = [
HintCode.UNIGNORABLE_IGNORE,
HintCode.UNNECESSARY_CAST,
HintCode.UNNECESSARY_IGNORE,
HintCode.UNNECESSARY_IMPORT,
HintCode.UNNECESSARY_NO_SUCH_METHOD,
HintCode.UNNECESSARY_NULL_COMPARISON_FALSE,
HintCode.UNNECESSARY_NULL_COMPARISON_TRUE,
Expand Down
2 changes: 2 additions & 0 deletions pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ class LibraryAnalyzer {
verifier.generateDuplicateShownHiddenNameHints(errorReporter);
verifier.generateUnusedImportHints(errorReporter);
verifier.generateUnusedShownNameHints(errorReporter);
verifier.generateUnnecessaryImportHints(
errorReporter, _usedImportedElementsList);
}

// Unused local elements.
Expand Down
Loading

0 comments on commit 510f264

Please sign in to comment.