diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 08e6024da0..247b78eaa0 100755 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -529,16 +529,17 @@ def CheckPublicDepsIsNotUsed(gn_files, input_api, output_api): 'because it doesn\'t map well to downstream build systems.\n' 'Used in: %s (line %d).\n' 'If you are not adding this code (e.g. you are just moving ' - 'existing code) or you have a good reason, you can add a ' - 'comment on the line that causes the problem:\n\n' + 'existing code) or you have a good reason, you can add this ' + 'comment (verbatim) on the line that causes the problem:\n\n' 'public_deps = [ # no-presubmit-check TODO(webrtc:8603)\n') for affected_file in gn_files: for (line_number, affected_line) in affected_file.ChangedContents(): - if ('public_deps' in affected_line - and not no_presubmit_check_re.search(affected_line)): - result.append( - output_api.PresubmitError(error_msg % (affected_file.LocalPath(), - line_number))) + if 'public_deps' in affected_line: + surpressed = no_presubmit_check_re.search(affected_line) + if not surpressed: + result.append( + output_api.PresubmitError(error_msg % (affected_file.LocalPath(), + line_number))) return result diff --git a/test/BUILD.gn b/test/BUILD.gn index abe0801857..464f44f60a 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -297,7 +297,8 @@ rtc_source_set("test_support") { public_deps = [] # no-presubmit-check TODO(webrtc:8603) if (is_ios) { - public_deps += [ ":test_support_objc" ] # no-presubmit-check TODO(webrtc:8603) + public_deps += # no-presubmit-check TODO(webrtc:8603) + [ ":test_support_objc" ] } public_configs = [ ":test_main_direct_config" ] @@ -620,7 +621,8 @@ rtc_source_set("run_test") { if (is_mac) { public_deps = [ ":run_test_objc" ] # no-presubmit-check TODO(webrtc:8603) } else { - public_deps = [ ":run_test_generic" ] # no-presubmit-check TODO(webrtc:8603) + public_deps = # no-presubmit-check TODO(webrtc:8603) + [ ":run_test_generic" ] } } @@ -677,7 +679,8 @@ rtc_library("direct_transport") { "../rtc_base/task_utils:repeating_task", "//third_party/abseil-cpp/absl/memory", ] - public_deps = [ "../call:fake_network" ] # no-presubmit-check TODO(webrtc:8603) + public_deps = # no-presubmit-check TODO(webrtc:8603) + [ "../call:fake_network" ] } rtc_library("fake_video_codecs") { @@ -832,10 +835,12 @@ rtc_library("test_common") { } rtc_source_set("test_renderer") { - public_deps = [ ":test_renderer_generic" ] # no-presubmit-check TODO(webrtc:8603) + public_deps = # no-presubmit-check TODO(webrtc:8603) + [ ":test_renderer_generic" ] testonly = true if (is_mac) { - public_deps += [ ":test_renderer_objc" ] # no-presubmit-check TODO(webrtc:8603) + public_deps += # no-presubmit-check TODO(webrtc:8603) + [ ":test_renderer_objc" ] } }