Drop a useless 'if'
authorAlexander Popov <alex.popov@linux.com>
Mon, 6 Mar 2023 14:59:53 +0000 (17:59 +0300)
committerAlexander Popov <alex.popov@linux.com>
Mon, 6 Mar 2023 14:59:53 +0000 (17:59 +0300)
This condition has been checked at the beginning of the function.

Noticed this in the code coverage report.

kconfig_hardened_check/__init__.py

index 7ba62e0fc40e68772dc811a096e8033dfd180fa2..cfe0877e93a05b2dc2b63f2f94a77bdf1cd8e8c2 100644 (file)
@@ -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):