From f985e675d872f39327484633e2a7fdce0213ce28 Mon Sep 17 00:00:00 2001 From: Matt Condino <36555625+mwcondino@users.noreply.github.com> Date: Tue, 30 Apr 2024 14:26:06 -0700 Subject: [PATCH] ament_clang_tidy - Fix Reporting when WarningsAsErrors is specified in config (#397) * feature Signed-off-by: Matt Condino --- ament_clang_tidy/ament_clang_tidy/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ament_clang_tidy/ament_clang_tidy/main.py b/ament_clang_tidy/ament_clang_tidy/main.py index 3f898215..5faa8142 100755 --- a/ament_clang_tidy/ament_clang_tidy/main.py +++ b/ament_clang_tidy/ament_clang_tidy/main.py @@ -173,6 +173,9 @@ def start_subprocess(full_cmd): print('The invocation of "%s" failed with error code %d: %s' % (os.path.basename(clang_tidy_bin), e.returncode, e), file=sys.stderr) + # Attempt to recover output, if any was found (eg - if + # WarningsAsErrors was specified in the config file). + output = e.output.decode('utf-8') return output files = []