diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-17 22:15:44 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-17 22:15:44 +0000 |
commit | a5b58f5ca9c9a179cfaba0ff237f12b5ca9d7de8 (patch) | |
tree | 8c17b41a706b9fab9960e947a52860bf0efc9712 /app/PRESUBMIT.py | |
parent | a3aaf3d6b857cdc73f837b36b05bf75bbd76b3b1 (diff) | |
download | chromium_src-a5b58f5ca9c9a179cfaba0ff237f12b5ca9d7de8.zip chromium_src-a5b58f5ca9c9a179cfaba0ff237f12b5ca9d7de8.tar.gz chromium_src-a5b58f5ca9c9a179cfaba0ff237f12b5ca9d7de8.tar.bz2 |
Fix lint errors in app/ and turn on presubmit check.
Review URL: http://codereview.chromium.org/400016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32222 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/PRESUBMIT.py')
-rwxr-xr-x | app/PRESUBMIT.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/PRESUBMIT.py b/app/PRESUBMIT.py new file mode 100755 index 0000000..b15b852b6 --- /dev/null +++ b/app/PRESUBMIT.py @@ -0,0 +1,25 @@ +#!/usr/bin/python + +# Copyright (c) 2009 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +"""Makes sure that the app/ code is cpplint clean.""" + +INCLUDE_CPP_FILES_ONLY = ( + r'.*\.cc$', r'.*\.h$' +) + +EXCLUDE = ( + # Autogenerated window resources files are off limits + r'.*resource.h$', +) + +def CheckChangeOnUpload(input_api, output_api): + results = [] + black_list = input_api.DEFAULT_BLACK_LIST + EXCLUDE + sources = lambda x: input_api.FilterSourceFile( + x, white_list=INCLUDE_CPP_FILES_ONLY, black_list=black_list) + results.extend(input_api.canned_checks.CheckChangeLintsClean( + input_api, output_api, sources)) + return results |