Don't run `dart format --fix` in the presubmit. `--fix` is going away in the new formatter so this gets the presubmit forward compatible with that. (If we really care about this check, we could migrate it to a separate `dart fix` check, but I don't think it's that important.) Change-Id: I20c9a8d9c849d72b451d9d614d1c5e9c28ca43e8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390564 Reviewed-by: Devon Carew <devoncarew@google.com> Auto-Submit: Bob Nystrom <rnystrom@google.com> Commit-Queue: Devon Carew <devoncarew@google.com> Reviewed-by: Samuel Rawlins <srawlins@google.com>
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index b05ae1cb..24faa35 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py
@@ -117,10 +117,6 @@ print('WARNING: dart not found: %s' % (dart)) return [] - dartFixes = [ - '--fix-named-default-separator', - ] - def HasFormatErrors(filename: str = None, filenames: list = None, contents: str = None): @@ -141,7 +137,6 @@ args = [ dart, 'format', - ] + dartFixes + [ '--set-exit-if-changed', '--output=none', '--summary=none', @@ -188,8 +183,7 @@ output_api.PresubmitError( 'File output does not match dart format.\n' 'Fix these issues with:\n' - '%s format %s%s%s' % (dart, ' '.join(dartFixes), lineSep, - lineSep.join(unformatted_files))) + '%s format %s' % (dart, lineSep.join(unformatted_files))) ] return []