run method
Runs this command.
The return value is wrapped in a Future
if necessary and returned by
CommandRunner.runCommand
.
Implementation
@override
void run() {
final directories = argResults?['folders'] as List<String>;
for (var dir in directories) {
final directory = Directory(dir);
if (!directory.existsSync()) {
print('Directory $dir does not exist.');
continue;
}
for (var file in directory.listSync(recursive: true)) {
if (file is File && file.path.endsWith('.dart')) {
validateFile(file);
}
}
}
}