summaryrefslogtreecommitdiffstats
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-28 17:39:21 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-28 17:39:21 +0000
commit379e7dd8c93fc59287a73bf801b134e459c2b10b (patch)
treee80fe93d69d750ca6ef0da33bf3b67711515373c /PRESUBMIT.py
parent381162b2224c18d592e077aae94343cb73296bb9 (diff)
downloadchromium_src-379e7dd8c93fc59287a73bf801b134e459c2b10b.zip
chromium_src-379e7dd8c93fc59287a73bf801b134e459c2b10b.tar.gz
chromium_src-379e7dd8c93fc59287a73bf801b134e459c2b10b.tar.bz2
Add back *.txt and *.json for the svn:eol-style check.
Don't add them to the other checks because they are not relevant. TEST=none BUG=none Review URL: http://codereview.chromium.org/556051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37412 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r--PRESUBMIT.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 706f194..7339de1 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -8,12 +8,16 @@ See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into gcl.
"""
-EXCLUDED_PATHS = (
+_EXCLUDED_PATHS = (
r"breakpad[\\\/].*",
r"skia[\\\/].*",
r"v8[\\\/].*",
)
+_TEXT_FILES = (
+ r".*\.txt",
+ r".*\.json",
+)
_LICENSE_HEADER = (
r".*? Copyright \(c\) 20\d\d The Chromium Authors\. All rights reserved\."
@@ -32,8 +36,11 @@ def _CommonChecks(input_api, output_api):
# add our black list (breakpad, skia and v8 are still not following
# google style and are not really living this repository).
# See presubmit_support.py InputApi.FilterSourceFile for the (simple) usage.
- black_list = input_api.DEFAULT_BLACK_LIST + EXCLUDED_PATHS
+ black_list = input_api.DEFAULT_BLACK_LIST + _EXCLUDED_PATHS
+ white_list = input_api.DEFAULT_WHITE_LIST + _TEXT_FILES
sources = lambda x: input_api.FilterSourceFile(x, black_list=black_list)
+ text_files = lambda x: input_api.FilterSourceFile(x, black_list=black_list,
+ white_list=white_list)
results.extend(input_api.canned_checks.CheckLongLines(
input_api, output_api, sources))
results.extend(input_api.canned_checks.CheckChangeHasNoTabs(
@@ -45,7 +52,7 @@ def _CommonChecks(input_api, output_api):
results.extend(input_api.canned_checks.CheckChangeHasTestField(
input_api, output_api))
results.extend(input_api.canned_checks.CheckChangeSvnEolStyle(
- input_api, output_api, sources))
+ input_api, output_api, text_files))
results.extend(input_api.canned_checks.CheckSvnForCommonMimeTypes(
input_api, output_api))
results.extend(input_api.canned_checks.CheckLicense(