diff options
author | Derek Schuff <dschuff@chromium.org> | 2012-08-14 13:10:17 -0700 |
---|---|---|
committer | Derek Schuff <dschuff@chromium.org> | 2012-08-14 13:10:17 -0700 |
commit | efa7b3d5c85f0242787eb091dadedc2727215df4 (patch) | |
tree | 554e48ba9ba4a6170d3b5cefc8e0990cc8d7351c | |
parent | 3e2807efa9fae68fa782f3b6755ab761f1f79b62 (diff) |
Add PRESUBMIT.py and OWNERS for LLVM
The presubmit reuses Chrome's standard checks, but excludes all directories
for the code checks because LLVM does not use Chromium style. The end result
is just the standard checks that check that there is a commit message and that
there is an LGTM.
The OWNERS file only has users who currently have access on the gerrit repo.
Obviously any user with full access there can bypass these checks, so they are
mostly just conveniences for keeping our commit logs uniform.
R=bradn,jvoung@chromium.org,sehr@chromium.org
BUG= http://code.google.com/p/nativeclient/issues/detail?id=2295
Review URL: https://chromiumcodereview.appspot.com/10830314
-rw-r--r-- | OWNERS | 4 | ||||
-rw-r--r-- | PRESUBMIT.py | 40 |
2 files changed, 44 insertions, 0 deletions
diff --git a/OWNERS b/OWNERS new file mode 100644 index 0000000000..069f53432c --- /dev/null +++ b/OWNERS @@ -0,0 +1,4 @@ +dschuff@chromium.org +jvoung@chromium.org +robertm@chromium.org +sehr@chromium.org diff --git a/PRESUBMIT.py b/PRESUBMIT.py new file mode 100644 index 0000000000..ced379050e --- /dev/null +++ b/PRESUBMIT.py @@ -0,0 +1,40 @@ +# 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 [] |