dryRun static method
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}) {
try {
_run(
['--output=none', '--set-exit-if-changed'],
coerceToPathList(fileOrPath),
lineLength: lineLength,
);
return false;
} on ProcessException catch (e) {
if (e.exitCode == 1) {
return true;
}
rethrow;
}
}