run method
void
run(
- CustomLintResolver resolver,
- ErrorReporter reporter,
- CustomLintContext context
Emits lints for a given file.
run will only be invoked with files respecting filesToAnalyze
Implementation
@override
void run(
CustomLintResolver resolver,
ErrorReporter reporter,
CustomLintContext context,
) {
context.registry.addMethodInvocation((node) {
if (!_isAppMethod(node, 'text')) return;
final textArg = _findNamedArgument(node, 'text');
if (textArg == null) return;
if (textArg is StringLiteral &&
textArg.stringValue?.trim().isEmpty == true) {
reporter.atNode(textArg, code);
}
});
}