Skip to content

Commit c0fd3eb

Browse files
committed
Change presumbit to not provide unix-specific syntax on Windows.
Copy-over of https://codereview.chromium.org/3005843002/ Change-Id: I8b95201f0570a249054597fffac89cc848791865 Reviewed-on: https://dart-review.googlesource.com/4341 Reviewed-by: Lasse R.H. Nielsen <lrn@google.com> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
1 parent 54b5707 commit c0fd3eb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

PRESUBMIT.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,14 @@ def HasFormatErrors(filename=None, contents=None):
8686
unformatted_files.append(filename)
8787

8888
if unformatted_files:
89+
lineSep = " \\\n"
90+
if windows:
91+
lineSep = " ^\n";
8992
return [output_api.PresubmitError(
9093
'File output does not match dartfmt.\n'
9194
'Fix these issues with:\n'
92-
'%s -w \\\n%s' % (prebuilt_dartfmt, ' \\\n'.join(unformatted_files)))]
95+
'%s -w%s%s' % (prebuilt_dartfmt, lineSep,
96+
lineSep.join(unformatted_files)))]
9397

9498
return []
9599

0 commit comments

Comments
 (0)