run method
void
run(
- CustomLintResolver resolver,
- DiagnosticReporter reporter,
- CustomLintContext context
Emits lints for a given file.
run will only be invoked with files respecting filesToAnalyze
Implementation
@override
void run(
CustomLintResolver resolver,
DiagnosticReporter reporter,
CustomLintContext context,
) {
context.registry.addInstanceCreationExpression((node) {
final data = _analyzeAlignInstanceCreationExpression(
node,
context.sharedState[_alignmentConstantKey] as DartObject?,
);
if (data case final data? when data.isAlignmentCenter) {
reporter.atNode(node.constructorName, code, data: data);
}
});
}