add lint reporting for offsets

Change-Id: I56898228f19039aeb6f241080cd3324027763b6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
This commit is contained in:
pq 2020-05-04 20:32:17 +00:00 committed by commit-bot@chromium.org
parent bbebad9eca
commit 767e78cb4d

View file

@ -628,6 +628,12 @@ abstract class LintRule extends Linter implements Comparable<LintRule> {
}
}
void reportLintForOffset(int offset, int length,
{List<Object> arguments = const [], ErrorCode errorCode}) {
reporter.reportErrorForOffset(
errorCode ?? lintCode, offset, length, arguments);
}
void reportLintForToken(Token token,
{List<Object> arguments = const [],
ErrorCode errorCode,