From 28deb0e583d75e6d740effec8e360c27f5c55af9 Mon Sep 17 00:00:00 2001 From: Fred Morcos Date: Mon, 8 May 2023 14:30:48 +0200 Subject: [PATCH] Don't fail when there are no warnings produced by clang-tidy --- .github/scripts/clang-tidy.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/scripts/clang-tidy.py b/.github/scripts/clang-tidy.py index 85982e2079..856be887f6 100755 --- a/.github/scripts/clang-tidy.py +++ b/.github/scripts/clang-tidy.py @@ -39,6 +39,11 @@ def main(): compdb = helpers.index_compdb(compdb) fixes = helpers.load_fixes_file(args.fixes_file) + + if not fixes: + print("No diagnostics or warnings produced by clang-tidy") + return 0 + fixes = fixes["Diagnostics"] have_warnings = False for fix in fixes: -- 2.47.2