Skip to content

Commit

Permalink
replace reportErrorForNode with atNode
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamVe committed Jan 10, 2025
1 parent 5e3ab6a commit 526ee5f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lint/lib/lint.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ class UseRecommendedWidget extends DartLintRule {
) {
context.registry.addInstanceCreationExpression((node) {
if (node.constructorName.toString() == discouraged) {
// ignore: deprecated_member_use
reporter.reportErrorForNode(code, node.constructorName);
reporter.atNode(node.constructorName, code);
}
});
}
Expand Down Expand Up @@ -90,8 +89,7 @@ class CallInitAfterCreation extends DartLintRule {
return;
}
}
// ignore: deprecated_member_use
reporter.reportErrorForNode(code, node.constructorName);
reporter.atNode(node.constructorName, code);
}
});
}
Expand Down

0 comments on commit 526ee5f

Please sign in to comment.