Chromium Code Reviews| Index: presubmit_support.py |
| diff --git a/presubmit_support.py b/presubmit_support.py |
| index 513e22ab821ba342a0a4c2015e7f1a37e762c2fd..70059445856f7029d347281a49c555642c25380a 100755 |
| --- a/presubmit_support.py |
| +++ b/presubmit_support.py |
| @@ -1221,6 +1221,10 @@ def Main(argv): |
| "system directories will also be searched.") |
| parser.add_option("--default_presubmit") |
| parser.add_option("--may_prompt", action='store_true', default=False) |
| + parser.add_option("--skip_canned", action='append', default=[], |
| + help="A list of checks to skip which appear in " |
| + "presubmit_canned_checks. Can be provided multiple times " |
| + "to skip multiple canned checks.") |
| parser.add_option("--rietveld_url", help=optparse.SUPPRESS_HELP) |
| parser.add_option("--rietveld_email", help=optparse.SUPPRESS_HELP) |
| parser.add_option("--rietveld_password", help=optparse.SUPPRESS_HELP) |
| @@ -1241,6 +1245,12 @@ def Main(argv): |
| options.rietveld_url, |
| options.rietveld_email, |
| options.rietveld_password) |
| + for method_name in options.skip_canned: |
|
M-A Ruel
2013/03/07 15:50:33
I'd like you to restore them after.
missing = [m
|
| + if hasattr(presubmit_canned_checks, method_name): |
| + setattr(presubmit_canned_checks, method_name, lambda *_a, **_kw: []) |
| + else: |
| + parser.error('Attempted to skip nonexistent canned presubmit check: %s' |
| + % method_name) |
| try: |
| results = DoPresubmitChecks( |
| change_class(options.name, |