From: Alexander Popov Date: Mon, 6 Mar 2023 14:59:53 +0000 (+0300) Subject: Drop a useless 'if' X-Git-Tag: v0.6.6~225 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=3d43910981b8b97a3902a7b07d4cc43ff5c29c51;hp=20e0040299ede214143fe229ef8121d48c3f73b5;p=kconfig-hardened-check.git Drop a useless 'if' This condition has been checked at the beginning of the function. Noticed this in the code coverage report. --- 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):