ParsedArguments.fromArgs constructor

ParsedArguments.fromArgs(
  1. ArgResults argResults
)

Implementation

factory ParsedArguments.fromArgs(ArgResults argResults) => ParsedArguments(
      excludePath: argResults[FlagNames.exclude] as String,
      rootFolder: argResults[FlagNames.rootFolder] as String,
      jsonReportPath: argResults[FlagNames.jsonReportPath] as String?,
      shouldPrintConfig: argResults[FlagNames.printConfig] as bool,
      metricsConfig: {
        for (final metric in getMetrics(config: {}))
          if (argResults.wasParsed(metric.id))
            metric.id: argResults[metric.id] as Object,
      },
    );