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.addVariableDeclarationList(
(node) {
final variables = node.variables;
String sourceCode = node.toSource();
if (sourceCode.isPathLang()) {
for (final variable in variables) {
if (!variable.isConst) {
reporter.reportErrorForToken(_code, variable.name);
}
}
}
},
);
}