CliRunner constructor

CliRunner([
  1. IOSink? output,
  2. 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();
}