From 8b1fab0c8dde954407a331a43307b2bf91fcdce8 Mon Sep 17 00:00:00 2001 From: Robert Nystrom Date: Wed, 16 Oct 2024 22:11:20 +0000 Subject: [PATCH] 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 Auto-Submit: Bob Nystrom Commit-Queue: Devon Carew Reviewed-by: Samuel Rawlins --- PRESUBMIT.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/PRESUBMIT.py b/PRESUBMIT.py index b05ae1cb8a2..24faa35ea14 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -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 []