function lint


Future lint({List<String> entryPoints, CommandLineOptions options, String currentPackage, Map<String, String> packageDirs})

Runs the polymer linter on any relevant file in your package, such as any .html file under 'lib/', 'asset/', and 'web/'.

The entryPoints list contains files under web/ that should be treated as entry points. Each entry on this list is a relative path from the package root (for example 'web/index.html'). If null, all files under 'web/' are treated as possible entry points.

Options must be passed by passing the options argument.

The linter needs to know the name of the currentPackage and the location where to find the code for any package it depends on (packageDirs). This is inferred automatically, but can be overriden by passing the arguments.

Source

Future lint({List<String> entryPoints, CommandLineOptions options,
    String currentPackage, Map<String, String> packageDirs}) {
  if (options == null) {
    print('warning: now that main takes arguments, you need to explicitly pass'
        ' options to lint(). Running as if no options were passed.');
    options = parseOptions([]);
  }
  if (currentPackage == null) currentPackage = readCurrentPackageFromPubspec();
  if (entryPoints == null) entryPoints = _parseEntryPointsFromPubspec();
  var linterOptions = new TransformOptions(entryPoints: entryPoints);
  var linter = new Linter(linterOptions, skipMissingElementWarning: true);

  return runBarback(new BarbackOptions([[linter]], null,
      currentPackage: currentPackage,
      packageDirs: packageDirs,
      machineFormat: options.machineFormat));
}