summaryrefslogtreecommitdiffstats
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authorjchaffraix@chromium.org <jchaffraix@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-22 00:06:25 +0000
committerjchaffraix@chromium.org <jchaffraix@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-22 00:06:25 +0000
commit9a48e3f844c61efdcf70478bfa4b42f8cd184af3 (patch)
tree63dedb9e2738783e8bdcf0e416afd2f20a674474 /PRESUBMIT.py
parent6d40a14b5aa4587a0c58ece85329c76fad23ce8d (diff)
downloadchromium_src-9a48e3f844c61efdcf70478bfa4b42f8cd184af3.zip
chromium_src-9a48e3f844c61efdcf70478bfa4b42f8cd184af3.tar.gz
chromium_src-9a48e3f844c61efdcf70478bfa4b42f8cd184af3.tar.bz2
Blacklist some file for the CSS deprecation hook
There are some documentation in the Chromium tree that is meant for external consumption (which includes WebKit) so it can't use the unprefixed CSS properties / values or functions. Review URL: https://codereview.chromium.org/294893003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272027 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r--PRESUBMIT.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 281a04a..59f3b10 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -1104,9 +1104,19 @@ _DEPRECATED_CSS = [
def _CheckNoDeprecatedCSS(input_api, output_api):
""" Make sure that we don't use deprecated CSS
- properties, functions or values. """
+ properties, functions or values. Our external
+ documentation is ignored by the hooks as it
+ needs to be consumed by WebKit. """
results = []
- file_filter = lambda f: f.LocalPath().endswith('.css')
+ file_inclusion_pattern = (r".+\.css$")
+ black_list = (_EXCLUDED_PATHS +
+ _TEST_CODE_EXCLUDED_PATHS +
+ input_api.DEFAULT_BLACK_LIST +
+ (r"^chrome/common/extensions/docs",
+ r"^chrome/docs",
+ r"^native_client_sdk"))
+ file_filter = lambda f: input_api.FilterSourceFile(
+ f, white_list=file_inclusion_pattern, black_list=black_list)
for fpath in input_api.AffectedFiles(file_filter=file_filter):
for line_num, line in fpath.ChangedContents():
for (deprecated_value, value) in _DEPRECATED_CSS: