LintConfig.fromArgs constructor
LintConfig.fromArgs(
- ParsedArguments arguments
Creates the config from cli arguments
.
Implementation
factory LintConfig.fromArgs(ParsedArguments arguments) => LintConfig(
shouldPrintConfig: arguments.shouldPrintConfig,
excludePatterns:
arguments.excludePath.isNotEmpty ? [arguments.excludePath] : [],
excludeForMetricsPatterns: const [],
metrics: {
for (final metric in getMetrics(config: {}))
if (arguments.metricsConfig.containsKey(metric.id))
metric.id: arguments.metricsConfig[metric.id]!,
},
rules: const {},
excludeForRulesPatterns: const [],
antiPatterns: const {},
analysisOptionsPath: null,
);