Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: PRESUBMIT.py

Issue 2795653005: Print the correct path to dartfmt in the presubmit error message. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 """Top-level presubmit script for Dart. 5 """Top-level presubmit script for Dart.
6 6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details about the presubmit API built into gcl. 8 for more details about the presubmit API built into gcl.
9 """ 9 """
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 if old_version_has_errors: 85 if old_version_has_errors:
86 print("WARNING: %s has existing and possibly new dartfmt issues" % 86 print("WARNING: %s has existing and possibly new dartfmt issues" %
87 git_file.LocalPath()) 87 git_file.LocalPath())
88 else: 88 else:
89 unformatted_files.append(filename) 89 unformatted_files.append(filename)
90 90
91 if unformatted_files: 91 if unformatted_files:
92 return [output_api.PresubmitError( 92 return [output_api.PresubmitError(
93 'File output does not match dartfmt.\n' 93 'File output does not match dartfmt.\n'
94 'Fix these issues with:\n' 94 'Fix these issues with:\n'
95 'dartfmt -w \\\n%s' % ' \\\n'.join(unformatted_files))] 95 '%s -w \\\n%s' % (prebuilt_dartfmt, ' \\\n'.join(unformatted_files)))]
96 96
97 return [] 97 return []
98 98
99 def CheckChangeOnCommit(input_api, output_api): 99 def CheckChangeOnCommit(input_api, output_api):
100 return (_CheckBuildStatus(input_api, output_api) + 100 return (_CheckBuildStatus(input_api, output_api) +
101 _CheckDartFormat(input_api, output_api)) 101 _CheckDartFormat(input_api, output_api))
102 102
103 def CheckChangeOnUpload(input_api, output_api): 103 def CheckChangeOnUpload(input_api, output_api):
104 return _CheckDartFormat(input_api, output_api) 104 return _CheckDartFormat(input_api, output_api)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698