Please forgive me, I fear lambdas :\
authorAlexander Popov <alex.popov@linux.com>
Fri, 20 Jul 2018 16:09:08 +0000 (19:09 +0300)
committerAlexander Popov <alex.popov@linux.com>
Fri, 20 Jul 2018 16:09:08 +0000 (19:09 +0300)
Also print the value of the unknown option

kconfig-hardened-check.py

index 07c71d6b60b95d3005ec4e263ae408e7eaf3ebbe..6bb930b747fb2da50a054a44fff635681767378f 100755 (executable)
@@ -217,9 +217,10 @@ def check_config_file(fname):
         perform_checks(parsed_options)
 
         if debug_mode:
-            opt_list_names = [opt[0].name for opt in opt_list]
-            for option in filter(lambda option: option not in opt_list_names, parsed_options.keys()):
-                print("DEBUG: dunno about option {} ".format(option))
+            known_options = [o[0].name for o in opt_list]
+            for option, value in parsed_options.items():
+                if option not in known_options:
+                    print("DEBUG: dunno about option {} ({})".format(option, value))
 
         print_check_results()