# Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Documentation on PRESUBMIT.py can be found at: # http://www.chromium.org/developers/how-tos/depottools/presubmit-scripts EXCLUDE_PROJECT_CHECKS_DIRS = [ '.' ] def _CommonChecks(input_api, output_api): """Checks for both upload and commit.""" results = [] results.extend(input_api.canned_checks.PanProjectChecks( input_api, output_api, project_name='Native Client', excluded_paths=tuple(EXCLUDE_PROJECT_CHECKS_DIRS))) return results def CheckChangeOnUpload(input_api, output_api): """Verifies all changes in all files. Args: input_api: the limited set of input modules allowed in presubmit. output_api: the limited set of output modules allowed in presubmit. """ report = [] report.extend(_CommonChecks(input_api, output_api)) return report def CheckChangeOnCommit(input_api, output_api): """Verifies all changes in all files and verifies that the tree is open and can accept a commit. Args: input_api: the limited set of input modules allowed in presubmit. output_api: the limited set of output modules allowed in presubmit. """ report = [] report.extend(CheckChangeOnUpload(input_api, output_api)) return report def GetPreferredTrySlaves(project, change): return []