LintConfig.fromAnalysisOptions constructor

LintConfig.fromAnalysisOptions(
  1. AnalysisOptions options
)

Creates the config from analysis options.

Implementation

factory LintConfig.fromAnalysisOptions(AnalysisOptions options) => LintConfig(
      excludePatterns: options.readIterableOfString(['analyzer', 'exclude']),
      excludeForMetricsPatterns: options
          .readIterableOfString(['metrics-exclude'], packageRelated: true),
      metrics: options.readMap(['metrics'], packageRelated: true),
      rules: options.readMapOfMap(['rules'], packageRelated: true),
      excludeForRulesPatterns: options
          .readIterableOfString(['rules-exclude'], packageRelated: true),
      antiPatterns:
          options.readMapOfMap(['anti-patterns'], packageRelated: true),
    );