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>
This commit is contained in:
committed by
Lasse R.H. Nielsen
parent
54b57079a3
commit
c0fd3eb119
+5
-1
@@ -86,10 +86,14 @@ def _CheckDartFormat(input_api, output_api):
|
||||
unformatted_files.append(filename)
|
||||
|
||||
if unformatted_files:
|
||||
lineSep = " \\\n"
|
||||
if windows:
|
||||
lineSep = " ^\n";
|
||||
return [output_api.PresubmitError(
|
||||
'File output does not match dartfmt.\n'
|
||||
'Fix these issues with:\n'
|
||||
'%s -w \\\n%s' % (prebuilt_dartfmt, ' \\\n'.join(unformatted_files)))]
|
||||
'%s -w%s%s' % (prebuilt_dartfmt, lineSep,
|
||||
lineSep.join(unformatted_files)))]
|
||||
|
||||
return []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user