@@ -38,7 +38,7 @@ import 'package:analyzer/src/dart/sdk/sdk.dart';
3838import 'package:analyzer/src/generated/engine.dart' hide AnalysisResult;
3939import 'package:analyzer/src/generated/java_io.dart' ;
4040import 'package:analyzer/src/generated/resolver.dart'
41- show Namespace, NamespaceBuilder, InheritanceManager;
41+ show Namespace, NamespaceBuilder, InheritanceManager; // ignore: deprecated_member_use
4242import 'package:analyzer/src/generated/sdk.dart' ;
4343import 'package:analyzer/src/generated/source.dart' ;
4444import 'package:analyzer/src/generated/source_io.dart' ;
@@ -1043,9 +1043,9 @@ class Class extends ModelElement
10431043 List <ExecutableElement > get _inheritedElements {
10441044 if (__inheritedElements == null ) {
10451045 Map <String , ExecutableElement > cmap = definingLibrary.inheritanceManager
1046- .getMembersInheritedFromClasses (element);
1046+ .getMembersInheritedFromClasses (element); // ignore: deprecated_member_use
10471047 Map <String , ExecutableElement > imap = definingLibrary.inheritanceManager
1048- .getMembersInheritedFromInterfaces (element);
1048+ .getMembersInheritedFromInterfaces (element); // ignore: deprecated_member_use
10491049 __inheritedElements = new List .from (cmap.values)
10501050 ..addAll (imap.values.where ((e) => ! cmap.containsKey (e.name)));
10511051 }
@@ -1515,15 +1515,15 @@ abstract class Canonicalization implements Locatable, Documentable {
15151515 // Penalty for deprecated libraries.
15161516 if (lib.isDeprecated) scoredCandidate.alterScore (- 1.0 , 'is deprecated' );
15171517 // Give a big boost if the library has the package name embedded in it.
1518- if (lib.package.namePieces.intersection (lib.namePieces).length > 0 ) {
1518+ if (lib.package.namePieces.intersection (lib.namePieces).isEmpty ) {
15191519 scoredCandidate.alterScore (1.0 , 'embeds package name' );
15201520 }
15211521 // Give a tiny boost for libraries with long names, assuming they're
15221522 // more specific (and therefore more likely to be the owner of this symbol).
15231523 scoredCandidate.alterScore (.01 * lib.namePieces.length, 'name is long' );
15241524 // If we don't know the location of this element, return our best guess.
15251525 // TODO(jcollins-g): is that even possible?
1526- assert (! locationPieces.isEmpty );
1526+ assert (locationPieces.isNotEmpty );
15271527 if (locationPieces.isEmpty) return scoredCandidate;
15281528 // The more pieces we have of the location in our library name, the more we should boost our score.
15291529 scoredCandidate.alterScore (
@@ -1928,7 +1928,7 @@ abstract class GetterSetterCombo implements ModelElement {
19281928 } else if (hasPublicSetter) {
19291929 _documentationFrom.addAll (setter.documentationFrom);
19301930 }
1931- if (_documentationFrom.length == 0 ||
1931+ if (_documentationFrom.isEmpty ||
19321932 _documentationFrom.every ((e) => e.documentationComment == '' ))
19331933 _documentationFrom = computeDocumentationFrom;
19341934 }
@@ -2376,9 +2376,12 @@ class Library extends ModelElement with Categorization, TopLevelContainer {
23762376 return '${package .baseHref }${library .dirName }/$fileName ' ;
23772377 }
23782378
2379+ // ignore: deprecated_member_use
23792380 InheritanceManager _inheritanceManager;
2381+ // ignore: deprecated_member_use
23802382 InheritanceManager get inheritanceManager {
23812383 if (_inheritanceManager == null ) {
2384+ // ignore: deprecated_member_use
23822385 _inheritanceManager = new InheritanceManager (element);
23832386 }
23842387 return _inheritanceManager;
@@ -3363,7 +3366,7 @@ abstract class ModelElement extends Canonicalization
33633366 // Avoid claiming canonicalization for elements outside of this element's
33643367 // defining package.
33653368 // TODO(jcollins-g): Make the else block unconditional.
3366- if (! candidateLibraries.isEmpty &&
3369+ if (candidateLibraries.isNotEmpty &&
33673370 ! candidateLibraries
33683371 .any ((l) => l.package == definingLibrary.package)) {
33693372 warn (PackageWarning .reexportedPrivateApiAcrossPackages,
@@ -3814,7 +3817,7 @@ abstract class ModelElement extends Canonicalization
38143817 }
38153818
38163819 String linkedParams (
3817- {bool showMetadata: true , bool showNames: true , String separator: ', ' }) {
3820+ {bool showMetadata = true , bool showNames = true , String separator = ', ' }) {
38183821 List <Parameter > requiredParams =
38193822 parameters.where ((Parameter p) => ! p.isOptional).toList ();
38203823 List <Parameter > positionalParams =
@@ -3886,7 +3889,7 @@ abstract class ModelElement extends Canonicalization
38863889 String _calculateLinkedName () {
38873890 // If we're calling this with an empty name, we probably have the wrong
38883891 // element associated with a ModelElement or there's an analysis bug.
3889- assert (! name.isEmpty ||
3892+ assert (name.isNotEmpty ||
38903893 (this .element is TypeDefiningElement &&
38913894 (this .element as TypeDefiningElement ).type.name == "dynamic" ) ||
38923895 this is ModelFunction );
@@ -3935,7 +3938,7 @@ abstract class ModelElement extends Canonicalization
39353938 var fragmentFile = new File (pathLib.join (dirPath, args['file' ]));
39363939 if (fragmentFile.existsSync ()) {
39373940 replacement = fragmentFile.readAsStringSync ();
3938- if (! lang.isEmpty ) {
3941+ if (lang.isNotEmpty ) {
39393942 replacement = replacement.replaceFirst ('```' , '```$lang ' );
39403943 }
39413944 } else {
@@ -4517,7 +4520,7 @@ abstract class ModelElement extends Canonicalization
45174520 final fragExtension = '.md' ;
45184521 var file = src + fragExtension;
45194522 var region = args['region' ] ?? '' ;
4520- if (! region.isEmpty ) {
4523+ if (region.isNotEmpty ) {
45214524 var dir = pathLib.dirname (src);
45224525 var basename = pathLib.basenameWithoutExtension (src);
45234526 var ext = pathLib.extension (src);
@@ -5241,15 +5244,15 @@ class PackageGraph {
52415244 }
52425245 }
52435246
5244- if (! c._mixins.isEmpty ) {
5247+ if (c._mixins.isNotEmpty ) {
52455248 c._mixins.forEach ((t) {
52465249 _checkAndAddClass (t.element, c);
52475250 });
52485251 }
52495252 if (c.supertype != null ) {
52505253 _checkAndAddClass (c.supertype.element, c);
52515254 }
5252- if (! c.interfaces.isEmpty ) {
5255+ if (c.interfaces.isNotEmpty ) {
52535256 c.interfaces.forEach ((t) {
52545257 _checkAndAddClass (t.element, c);
52555258 });
@@ -6551,7 +6554,7 @@ class PackageBuilder {
65516554 final UriResolver packageResolver = new PackageMapUriResolver (
65526555 PhysicalResourceProvider .INSTANCE , packageMap);
65536556 UriResolver sdkResolver;
6554- if (embedderSdk == null || embedderSdk.urlMappings.length == 0 ) {
6557+ if (embedderSdk == null || embedderSdk.urlMappings.isEmpty ) {
65556558 // The embedder uri resolver has no mappings. Use the default Dart SDK
65566559 // uri resolver.
65576560 sdkResolver = new DartUriResolver (sdk);
0 commit comments