From 2f3f722aa861e836425293577d22e3499b2438a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20H=C3=B6glund?= Date: Tue, 19 Dec 2017 11:08:56 +0100 Subject: [PATCH] Make orphan headers message more readable. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:7619 Change-Id: I8491c837c4fd3d0ac322804dbc726e125ae14463 Reviewed-on: https://webrtc-review.googlesource.com/34646 Reviewed-by: Mirko Bonadei Commit-Queue: Patrik Höglund Cr-Commit-Position: refs/heads/master@{#21365} --- PRESUBMIT.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 5b554b8187..1b39aaa181 100755 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -749,8 +749,7 @@ def CheckOrphanHeaders(input_api, output_api): # We need to wait until we have an input_api object and use this # roundabout construct to import prebubmit_checks_lib because this file is # eval-ed and thus doesn't have __file__. - error_msg = """Header file {} is not listed in any GN target. - Please create a target or add it to an existing one in {}""" + error_msg = """{} should be listed in {}.""" results = [] with _AddToPath(input_api.os_path.join( input_api.PresubmitLocalPath(), 'tools_webrtc', 'presubmit_checks_lib')): @@ -766,7 +765,7 @@ def CheckOrphanHeaders(input_api, output_api): in_build_gn = IsHeaderInBuildGn(file_path, gn_file_path) if not in_build_gn: results.append(output_api.PresubmitError(error_msg.format( - file_path, gn_file_path))) + f.LocalPath(), os.path.relpath(gn_file_path)))) return results