analyze method

void analyze (dynamic fileOrPaths, { Directory packageRoot, bool fatalWarnings: false })

Analyze a File, a path (String), or a list of files or paths.

Implementation

static void analyze(fileOrPaths,
    {Directory packageRoot, bool fatalWarnings: false}) {
  List<String> args = [];
  if (packageRoot != null) args.add('--package-root=${packageRoot.path}');
  if (fatalWarnings) args.add('--fatal-warnings');
  args.addAll(findDartSourceFiles(coerceToPathList(fileOrPaths)));
  runlib.run(sdkBin('dartanalyzer'), arguments: args);
}