analyze static method

void analyze(
  1. dynamic fileOrPaths, {
  2. Directory? packageRoot,
  3. 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}) {
  runlib.run(sdkBin('dart'), arguments: [
    'analyze',
    if (packageRoot != null) '--package-root=${packageRoot.path}',
    if (fatalWarnings) '--fatal-warnings',
    fileOrPaths
  ]);
}