Skip to content

Commit 8b1fab0

Browse files
munificentCommit Queue
authored andcommitted
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 <[email protected]> Auto-Submit: Bob Nystrom <[email protected]> Commit-Queue: Devon Carew <[email protected]> Reviewed-by: Samuel Rawlins <[email protected]>
1 parent e00cdc8 commit 8b1fab0

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

PRESUBMIT.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,6 @@ def _CheckDartFormat(input_api, output_api):
117117
print('WARNING: dart not found: %s' % (dart))
118118
return []
119119

120-
dartFixes = [
121-
'--fix-named-default-separator',
122-
]
123-
124120
def HasFormatErrors(filename: str = None,
125121
filenames: list = None,
126122
contents: str = None):
@@ -141,7 +137,6 @@ def skip_file(path):
141137
args = [
142138
dart,
143139
'format',
144-
] + dartFixes + [
145140
'--set-exit-if-changed',
146141
'--output=none',
147142
'--summary=none',
@@ -188,8 +183,7 @@ def skip_file(path):
188183
output_api.PresubmitError(
189184
'File output does not match dart format.\n'
190185
'Fix these issues with:\n'
191-
'%s format %s%s%s' % (dart, ' '.join(dartFixes), lineSep,
192-
lineSep.join(unformatted_files)))
186+
'%s format %s' % (dart, lineSep.join(unformatted_files)))
193187
]
194188

195189
return []

0 commit comments

Comments
 (0)