From c5e554aca44b9eacd31a4d90b182036045026e93 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 13:35:50 +0200 Subject: [PATCH] ament_clang_tidy - Fix Reporting when WarningsAsErrors is specified in config (#397) (#488) * feature Signed-off-by: Matt Condino (cherry picked from commit f985e675d872f39327484633e2a7fdce0213ce28) Co-authored-by: Matt Condino <36555625+mwcondino@users.noreply.github.com> --- 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 6745d8d6..96bf0ca6 100755 --- a/ament_clang_tidy/ament_clang_tidy/main.py +++ b/ament_clang_tidy/ament_clang_tidy/main.py @@ -171,6 +171,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 = []