From 3d43910981b8b97a3902a7b07d4cc43ff5c29c51 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Mon, 6 Mar 2023 17:59:53 +0300 Subject: [PATCH 1/1] Drop a useless 'if' This condition has been checked at the beginning of the function. Noticed this in the code coverage report. --- kconfig_hardened_check/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index 7ba62e0..cfe0877 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -142,8 +142,7 @@ def print_checklist(mode, checklist, with_results): fail_suppressed = ' (suppressed in output)' if mode == 'show_fail': ok_suppressed = ' (suppressed in output)' - if mode != 'json': - print(f'[+] Config check is finished: \'OK\' - {ok_count}{ok_suppressed} / \'FAIL\' - {fail_count}{fail_suppressed}') + print(f'[+] Config check is finished: \'OK\' - {ok_count}{ok_suppressed} / \'FAIL\' - {fail_count}{fail_suppressed}') def parse_kconfig_file(parsed_options, fname): -- 2.31.1