Skip to content

Commit 456dd6e

Browse files
authored
Enforce analyzer_use_new_elements rule (#3963)
1 parent e129586 commit 456dd6e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+133
-0
lines changed

analysis_options.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ linter:
1818
rules:
1919
- always_declare_return_types
2020
- always_put_required_named_parameters_first
21+
- analyzer_use_new_elements
2122
- avoid_bool_literals_in_conditional_expressions
2223
- avoid_catching_errors
2324
- avoid_dynamic_calls

analyzer_use_new_elements.txt

Whitespace-only changes.

lib/src/dartdoc_options.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// ignore_for_file: analyzer_use_new_elements
6+
57
/// dartdoc's dartdoc_options.yaml configuration file follows similar loading
68
/// semantics to that of analysis_options.yaml,
79
/// [documented here](https://dart.dev/guides/language/analysis-options).

lib/src/element_type.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// ignore_for_file: analyzer_use_new_elements
6+
57
/// The models used to represent Dart types, all subclasses of [ElementType].
68
///
79
/// The only entrypoint for constructing these classes is [ElementType.for_].

lib/src/generator/generator_frontend.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// ignore_for_file: analyzer_use_new_elements
6+
57
import 'package:dartdoc/src/generator/generator.dart';
68
import 'package:dartdoc/src/generator/generator_backend.dart';
79
import 'package:dartdoc/src/generator/templates.dart';

lib/src/generator/templates.aot_renderers_for_html.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// ignore_for_file: unused_local_variable
1313
// ignore_for_file: non_constant_identifier_names, unnecessary_string_escapes
1414

15+
// ignore_for_file: analyzer_use_new_elements
16+
1517
import 'dart:convert';
1618

1719
import 'package:dartdoc/src/generator/template_data.dart';

lib/src/generator/templates.runtime_renderers.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
// ignore_for_file: non_constant_identifier_names, unnecessary_string_escapes
88
// ignore_for_file: unused_import
99
// ignore_for_file: use_super_parameters
10+
11+
// ignore_for_file: analyzer_use_new_elements
12+
1013
import 'package:dartdoc/src/element_type.dart';
1114
import 'package:dartdoc/src/generator/template_data.dart';
1215
import 'package:dartdoc/src/model/annotation.dart';

lib/src/model/accessor.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// ignore_for_file: analyzer_use_new_elements
6+
57
import 'dart:convert';
68

79
import 'package:analyzer/dart/element/element.dart';

lib/src/model/annotation.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// ignore_for_file: analyzer_use_new_elements
6+
57
import 'dart:convert';
68

79
import 'package:analyzer/dart/element/element.dart';

lib/src/model/canonicalization.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// ignore_for_file: analyzer_use_new_elements
6+
57
import 'package:analyzer/dart/element/element.dart';
68
import 'package:dartdoc/src/model/model.dart';
79
import 'package:dartdoc/src/warnings.dart';

0 commit comments

Comments
 (0)