Skip to content

Commit a89f2ed

Browse files
Merge branch 'plugin-analyzer-6' into remove-mirrors
2 parents 4fab2df + dacf413 commit a89f2ed

6 files changed

Lines changed: 9 additions & 5 deletions

File tree

tools/analyzer_plugin/lib/src/assist/toggle_stateful.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class ToggleComponentStatefulness extends AssistContributorBase with ComponentDe
4747
await super.computeAssists(request, collector);
4848
if (!setupCompute() || !initializeAssistApi(request.result.content)) return;
4949

50-
newComponentBaseClass = _getNewBase(componentSupertypeNode.name.name);
50+
newComponentBaseClass = _getNewBase(componentSupertypeNode.nameLexeme);
5151

5252
// If there is no known corresponding base class, short circuit.
5353
if (newComponentBaseClass == null) return;

tools/analyzer_plugin/lib/src/diagnostic/exhaustive_deps.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import 'package:analyzer_plugin/protocol/protocol_common.dart' show Location;
3434
import 'package:over_react_analyzer_plugin/src/diagnostic/analyzer_debug_helper.dart';
3535
import 'package:over_react_analyzer_plugin/src/diagnostic_contributor.dart';
3636
import 'package:over_react_analyzer_plugin/src/indent_util.dart';
37+
import 'package:over_react_analyzer_plugin/src/over_react_builder_parsing.dart' show TypeNameHelper;
3738
import 'package:over_react_analyzer_plugin/src/util/ast_util.dart';
3839
import 'package:over_react_analyzer_plugin/src/util/function_components.dart';
3940
import 'package:over_react_analyzer_plugin/src/util/pretty_print.dart';
@@ -680,7 +681,7 @@ class ExhaustiveDeps extends DiagnosticContributor {
680681
// NamedType case. This is for references to generic type parameters
681682
// (references to other types will get filtered out by the isDeclaredInPureScope check above).
682683
(reference) {
683-
dependency = reference.name.name;
684+
dependency = reference.nameLexeme;
684685
// These aren't possible for type annotations.
685686
isStable = false;
686687
isUsedAsCascadeTarget = false;
@@ -1980,7 +1981,7 @@ _Recommendations collectRecommendations({
19801981
String? getConstructionExpressionType(Expression node) {
19811982
if (node is InstanceCreationExpression) {
19821983
if (node.isConst) return null;
1983-
return node.constructorName.type.name.name;
1984+
return node.constructorName.type.nameLexeme;
19841985
} else if (node is ListLiteral) {
19851986
return _DepType.list;
19861987
} else if (node is SetOrMapLiteral) {

tools/analyzer_plugin/lib/src/diagnostic/visitors/non_static_reference_visitor.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ bool referencesImplicitThis(SimpleIdentifier identifier) {
7070
}
7171
// not a class member
7272
final Element? enclosingElement = element.enclosingElement;
73-
if (enclosingElement is! InterfaceOrAugmentationElement) {
73+
if (enclosingElement is! InterfaceElement) {
7474
return false;
7575
}
7676
// comment

tools/analyzer_plugin/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ repository: https://github.com/Workiva/over_react/tree/master/tools/analyzer_plu
66
environment:
77
sdk: '>=2.19.0 <3.0.0'
88
dependencies:
9-
analyzer: ^5.11.0
9+
analyzer: '>=5.11.0 <7.0.0'
1010
analyzer_plugin: ^0.11.0
1111
collection: ^1.15.0-nullsafety.4
1212
meta: ^1.16.0

tools/analyzer_plugin/test/integration/stubs.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ class StubServerPlugin implements ServerPlugin {
101101
handleEditGetRefactoring(parameters) => throw UnimplementedError();
102102

103103
@override
104+
// ignore: override_on_non_overriding_member
104105
handleKytheGetKytheEntries(parameters) => throw UnimplementedError();
105106

106107
@override

tools/analyzer_plugin/test/unit/util/prop_declaration/util.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ Future<ResolvedUnitResult> resolveFileAndGeneratedPart(SharedAnalysisContext sha
4242
.where((e) => e.severity != Severity.info && !e.errorCode.name.toLowerCase().startsWith('unused_'))
4343
// FIXME(FED-2015) remove once these are properly ignored in generated code
4444
.where((e) => e.errorCode.name.toLowerCase() != 'invalid_use_of_visible_for_overriding_member')
45+
// For some reason this is triggering for '$mustCallSuper'; ignore for now. TODO look into what's going on here
46+
.where((e) => e.errorCode.name.toLowerCase() != 'invalid_annotation_target')
4547
.toList();
4648

4749
final libraryResult = await getResolvedUnit(libraryFullPath);

0 commit comments

Comments
 (0)