CliRunner constructor
CliRunner([
- IOSink? output,
- PubUpdater? pubUpdater
Implementation
CliRunner([IOSink? output, PubUpdater? pubUpdater])
: _logger = Logger(output ?? stdout),
_pubUpdater = pubUpdater ?? PubUpdater(),
super('metrics', 'Analyze and improve your code quality.') {
[
AnalyzeCommand(_logger),
CheckUnusedFilesCommand(_logger),
CheckUnusedL10nCommand(_logger),
CheckUnusedCodeCommand(_logger),
CheckUnnecessaryNullableCommand(_logger),
FixCommand(_logger),
].forEach(addCommand);
_usesVersionOption();
}