Chromium Code Reviews| Index: tools/metrics/histograms/PRESUBMIT.py |
| diff --git a/tools/metrics/histograms/PRESUBMIT.py b/tools/metrics/histograms/PRESUBMIT.py |
| deleted file mode 100644 |
| index 7d9e9ff66bb2fbc421f727e7dd893e751f4e56ac..0000000000000000000000000000000000000000 |
| --- a/tools/metrics/histograms/PRESUBMIT.py |
| +++ /dev/null |
| @@ -1,39 +0,0 @@ |
| -# Copyright 2013 The Chromium Authors. All rights reserved. |
| -# Use of this source code is governed by a BSD-style license that can be |
| -# found in the LICENSE file. |
| - |
| -""" |
| -See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
| -for more details on the presubmit API built into depot_tools. |
| -""" |
| - |
| - |
| -def CheckChange(input_api, output_api): |
| - """Checks that histograms.xml is pretty-printed and well-formatted.""" |
| - for f in input_api.AffectedTextFiles(): |
| - p = f.AbsoluteLocalPath() |
| - if (input_api.basename(p) == 'histograms.xml' |
| - and input_api.os_path.dirname(p) == input_api.PresubmitLocalPath()): |
| - cwd = input_api.os_path.dirname(p) |
| - exit_code = input_api.subprocess.call( |
| - ['python', 'pretty_print.py', '--presubmit'], cwd=cwd) |
| - if exit_code != 0: |
| - return [output_api.PresubmitError( |
| - 'histograms.xml is not formatted correctly; run %s/pretty_print.py ' |
| - 'to fix' % input_api.PresubmitLocalPath())] |
| - |
| - exit_code = input_api.subprocess.call( |
| - ['python', 'validate_format.py'], cwd=cwd) |
| - if exit_code != 0: |
| - return [output_api.PresubmitError( |
| - 'histograms.xml is not well formatted; run %s/validate_format.py ' |
|
Alexei Svitkine (slow)
2017/04/03 15:49:49
"git cl format" only does the pretty_print.py part
DaleCurtis
2017/04/03 18:22:54
Ah yeah, git cl format has rudimentary validation,
|
| - 'and fix the reported errors' % input_api.PresubmitLocalPath())] |
| - return [] |
| - |
| - |
| -def CheckChangeOnUpload(input_api, output_api): |
| - return CheckChange(input_api, output_api) |
| - |
| - |
| -def CheckChangeOnCommit(input_api, output_api): |
| - return CheckChange(input_api, output_api) |