Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
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
Update the API check script for the latest Dart analyzer APIs
  • Loading branch information
jason-simmons committed Aug 31, 2022
commit 5b4971c6a885d542926f0cca9926a54e110a4df0
4 changes: 2 additions & 2 deletions tools/api_check/lib/apicheck.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ List<String> getDartClassFields({
final RegExp fieldExp = RegExp(r'_k(\w*)Index');
final List<String> fields = <String>[];
for (final CompilationUnitMember unitMember in result.unit.declarations) {
if (unitMember is ClassDeclaration && unitMember.name.name == className) { // ignore: deprecated_member_use
if (unitMember is ClassDeclaration && unitMember.name2.lexeme == className) {
for (final ClassMember classMember in unitMember.members) {
if (classMember is FieldDeclaration) {
for (final VariableDeclaration field in classMember.fields.variables) {
final String fieldName = field.name.name; // ignore: deprecated_member_use
final String fieldName = field.name2.lexeme;
final RegExpMatch? match = fieldExp.firstMatch(fieldName);
if (match != null) {
fields.add(match.group(1)!);
Expand Down