Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Unified Diff: PRESUBMIT.py

Issue 294893003: Blacklist some file for the CSS deprecation hook (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 281a04ac4c930eed9867f0690bf221a52d8fdd7b..59f3b105862b167803d5df7d4b8c08465ebde0a4 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:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698