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>
This commit is contained in:
Robert Nystrom
2024-10-16 22:11:20 +00:00
committed by Commit Queue
parent e00cdc8413
commit 8b1fab0c8d
+1 -7
View File
@@ -117,10 +117,6 @@ def _CheckDartFormat(input_api, output_api):
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 @@ def _CheckDartFormat(input_api, output_api):
args = [
dart,
'format',
] + dartFixes + [
'--set-exit-if-changed',
'--output=none',
'--summary=none',
@@ -188,8 +183,7 @@ def _CheckDartFormat(input_api, output_api):
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 []