dryRun method

bool dryRun (dynamic fileOrPath, { int lineLength })

Run the dartfmt command with the --dry-run option. Return true if any files would be changed by running the formatter.

Implementation

static bool dryRun(fileOrPath, {int lineLength}) {
  String results =
      _run('--dry-run', coerceToPathList(fileOrPath), lineLength: lineLength);
  return results.trim().isNotEmpty;
}