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

Unified Diff: PRESUBMIT.py

Issue 1980693002: Upstream: Ignore android.util.Log usage in WebAPK code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 4e5e5c36c2051832f8f39472767a6390323c6b7e..7672a57ede6a43b87b8011450c6cd3a177bac01b 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -1439,6 +1439,13 @@ def _CheckAndroidCrLogUsage(input_api, output_api):
- Are using 'TAG' as variable name for the tags (warn)
- Are using a tag that is shorter than 20 characters (error)
"""
+
+ # Do not check format of logs in //chrome/android/webapk because
+ # //chrome/android/webapk cannot depend on //base
+ cr_log_check_excluded_paths = [
+ r"^chrome[\\\/]android[\\\/]webapk[\\\/].*",
+ ]
+
cr_log_import_pattern = input_api.re.compile(
r'^import org\.chromium\.base\.Log;$', input_api.re.MULTILINE)
class_in_base_pattern = input_api.re.compile(
@@ -1453,7 +1460,8 @@ def _CheckAndroidCrLogUsage(input_api, output_api):
REF_MSG = ('See docs/android_logging.md '
'or contact dgn@chromium.org for more info.')
- sources = lambda x: input_api.FilterSourceFile(x, white_list=(r'.*\.java$',))
+ sources = lambda x: input_api.FilterSourceFile(x, white_list=(r'.*\.java$',),
+ black_list=cr_log_check_excluded_paths)
tag_decl_errors = []
tag_length_errors = []
« 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