From 86a7642ef5979ff1cf28f4b3eda73dae8f0e0ef2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Torbj=C3=B6rn=20SVENSSON?= Date: Wed, 7 May 2025 19:22:08 +0200 Subject: [PATCH] check_GNU_style: Remove literal prefix MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The path "b/binutils/dwarf.c" should be printed as binutils/dwarf.c", not "inutils/dwarf.c". contrib/ChangeLog: * check_GNU_style_lib.py: Remove literal prefix. Signed-off-by: Torbjörn SVENSSON --- contrib/check_GNU_style_lib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/check_GNU_style_lib.py b/contrib/check_GNU_style_lib.py index f680983d2f36..8b930ef6bdb3 100755 --- a/contrib/check_GNU_style_lib.py +++ b/contrib/check_GNU_style_lib.py @@ -279,7 +279,9 @@ def check_GNU_style_file(file, format): patch = PatchSet(file) for pfile in patch.added_files + patch.modified_files: - t = pfile.target_file.lstrip('b/') + t = pfile.target_file + if t.startswith('b/'): + t = t[2:] # Skip testsuite files if 'testsuite' in t or t.endswith('.py'): continue -- 2.47.2