From b1ce775c2969228596ac9b1a57532ea373e8e26b Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Sun, 8 May 2011 13:50:16 +0000 Subject: [PATCH] Move copyright and svn mime check presubmit checks to trigger on commit only. The commit bot automagically fixes these issues so the devs don't need to fix these problems TEST=none BUG=none R=dpranke@chromium.org Review URL: http://codereview.chromium.org/6948006 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@84572 0039d316-1c4b-4281-b951-d872f2087c98 --- presubmit_canned_checks.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py index d6b31ce13..c62caf5a6 100644 --- a/presubmit_canned_checks.py +++ b/presubmit_canned_checks.py @@ -939,17 +939,21 @@ def PanProjectChecks(input_api, output_api, snapshot("checking eol style") results.extend(input_api.canned_checks.CheckChangeSvnEolStyle( input_api, output_api, source_file_filter=text_files)) - snapshot("checking svn mime types") - results.extend(input_api.canned_checks.CheckSvnForCommonMimeTypes( - input_api, output_api)) - snapshot("checking license") - results.extend(input_api.canned_checks.CheckLicense( - input_api, output_api, license_header, source_file_filter=sources)) snapshot("checking nsobjects") results.extend(_CheckConstNSObject( input_api, output_api, source_file_filter=sources)) snapshot("checking singletons") results.extend(_CheckSingletonInHeaders( input_api, output_api, source_file_filter=sources)) + + # The following checks are only done on commit, since the commit bot will + # auto-fix most of these. + if input_api.is_committing: + snapshot("checking svn mime types") + results.extend(input_api.canned_checks.CheckSvnForCommonMimeTypes( + input_api, output_api)) + snapshot("checking license") + results.extend(input_api.canned_checks.CheckLicense( + input_api, output_api, license_header, source_file_filter=sources)) snapshot("done") return results