Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/analyzer_plugin/lib/src/assist/toggle_stateful.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ToggleComponentStatefulness extends AssistContributorBase with ComponentDe
await super.computeAssists(request, collector);
if (!setupCompute() || !initializeAssistApi(request.result.content)) return;

newComponentBaseClass = _getNewBase(componentSupertypeNode.name.name);
newComponentBaseClass = _getNewBase(componentSupertypeNode.nameLexeme);

// If there is no known corresponding base class, short circuit.
if (newComponentBaseClass == null) return;
Expand Down
5 changes: 3 additions & 2 deletions tools/analyzer_plugin/lib/src/diagnostic/exhaustive_deps.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import 'package:analyzer_plugin/protocol/protocol_common.dart' show Location;
import 'package:over_react_analyzer_plugin/src/diagnostic/analyzer_debug_helper.dart';
import 'package:over_react_analyzer_plugin/src/diagnostic_contributor.dart';
import 'package:over_react_analyzer_plugin/src/indent_util.dart';
import 'package:over_react_analyzer_plugin/src/over_react_builder_parsing.dart' show TypeNameHelper;
import 'package:over_react_analyzer_plugin/src/util/ast_util.dart';
import 'package:over_react_analyzer_plugin/src/util/function_components.dart';
import 'package:over_react_analyzer_plugin/src/util/pretty_print.dart';
Expand Down Expand Up @@ -680,7 +681,7 @@ class ExhaustiveDeps extends DiagnosticContributor {
// NamedType case. This is for references to generic type parameters
// (references to other types will get filtered out by the isDeclaredInPureScope check above).
(reference) {
dependency = reference.name.name;
dependency = reference.nameLexeme;
// These aren't possible for type annotations.
isStable = false;
isUsedAsCascadeTarget = false;
Expand Down Expand Up @@ -1980,7 +1981,7 @@ _Recommendations collectRecommendations({
String? getConstructionExpressionType(Expression node) {
if (node is InstanceCreationExpression) {
if (node.isConst) return null;
return node.constructorName.type.name.name;
return node.constructorName.type.nameLexeme;
} else if (node is ListLiteral) {
return _DepType.list;
} else if (node is SetOrMapLiteral) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ bool referencesImplicitThis(SimpleIdentifier identifier) {
}
// not a class member
final Element? enclosingElement = element.enclosingElement;
if (enclosingElement is! InterfaceOrAugmentationElement) {
if (enclosingElement is! InterfaceElement) {
return false;
}
// comment
Expand Down
2 changes: 1 addition & 1 deletion tools/analyzer_plugin/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository: https://github.com/Workiva/over_react/tree/master/tools/analyzer_plu
environment:
sdk: '>=2.19.0 <3.0.0'
dependencies:
analyzer: ^5.11.0
analyzer: '>=5.11.0 <7.0.0'
analyzer_plugin: ^0.11.0
collection: ^1.15.0-nullsafety.4
meta: ^1.16.0
Expand Down
1 change: 1 addition & 0 deletions tools/analyzer_plugin/test/integration/stubs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class StubServerPlugin implements ServerPlugin {
handleEditGetRefactoring(parameters) => throw UnimplementedError();

@override
// ignore: override_on_non_overriding_member
handleKytheGetKytheEntries(parameters) => throw UnimplementedError();

@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Future<ResolvedUnitResult> resolveFileAndGeneratedPart(SharedAnalysisContext sha
.where((e) => e.severity != Severity.info && !e.errorCode.name.toLowerCase().startsWith('unused_'))
// FIXME(FED-2015) remove once these are properly ignored in generated code
.where((e) => e.errorCode.name.toLowerCase() != 'invalid_use_of_visible_for_overriding_member')
// For some reason this is triggering for '$mustCallSuper'; ignore for now. FIXME look into what's going on here
.where((e) => e.errorCode.name.toLowerCase() != 'invalid_annotation_target')
.toList();

final libraryResult = await getResolvedUnit(libraryFullPath);
Expand Down
Loading