From 68bdb650685df061967bcfcc706a55e885ccb4d0 Mon Sep 17 00:00:00 2001 From: Miguel Casas Date: Tue, 19 Dec 2017 16:29:09 +0000 Subject: [PATCH] PRESUBMIT: Skip TODO(crbug.com/ pattern for upload warning This CL admits the TODO(crbug.com/...) format for bug references in the code base and avoids the presubmit warning in those cases. This pattern is pervasive and even necessary in some folders (e.g. ios/) so, although it isn't linkified by cs.chromium.org, it's accepted. Change-Id: Ifb6eda7967271acf76ddfb5fa555ed60f9bce415 Reviewed-on: https://chromium-review.googlesource.com/833203 Reviewed-by: Jochen Eisinger Reviewed-by: Sylvain Defresne Commit-Queue: Miguel Casas Cr-Commit-Position: refs/heads/master@{#525052} --- PRESUBMIT.py | 7 +++++-- PRESUBMIT_test.py | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/PRESUBMIT.py b/PRESUBMIT.py index b3f9a99f18ce1c..3dec54d61613a8 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -2762,17 +2762,20 @@ def _CheckSyslogUseWarning(input_api, output_api, source_file_filter=None, def _CheckCrbugLinksHaveHttps(input_api, output_api): - """Checks that crbug(.com) links are correctly prefixed by https://""" + """Checks that crbug(.com) links are correctly prefixed by https://, + unless they come in the accepted form TODO(crbug.com/...) + """ white_list = r'.+%s' % _IMPLEMENTATION_EXTENSIONS black_list = (_EXCLUDED_PATHS + _TEST_CODE_EXCLUDED_PATHS) sources = lambda f: input_api.FilterSourceFile( f, white_list=white_list, black_list=black_list) pattern = input_api.re.compile(r'//.*(?