PRESUBMIT.py 890 B

12345678910111213141516171819202122232425262728
  1. # Copyright 2015 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. """Presubmit script for changes affecting tools/perf/.
  5. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
  6. for more details about the presubmit API built into depot_tools.
  7. """
  8. def _CommonChecks(input_api, output_api):
  9. """Performs common checks, which includes running pylint."""
  10. results = []
  11. results.extend(input_api.canned_checks.RunPylint(
  12. input_api, output_api, black_list=[], pylintrc='pylintrc'))
  13. return results
  14. def CheckChangeOnUpload(input_api, output_api):
  15. report = []
  16. report.extend(_CommonChecks(input_api, output_api))
  17. return report
  18. def CheckChangeOnCommit(input_api, output_api):
  19. report = []
  20. report.extend(_CommonChecks(input_api, output_api))
  21. return report