Improve 'dunno' report in debug_mode
authorAlexander Popov <alex.popov@linux.com>
Sat, 7 Mar 2020 20:39:23 +0000 (23:39 +0300)
committerAlexander Popov <alex.popov@linux.com>
Sat, 7 Mar 2020 20:39:23 +0000 (23:39 +0300)
kconfig-hardened-check.py

index e2d84838ddd66ec876aa84cd9ce2ccf6d0c08cf7..79206d2785706cad163b127c6899197f097ebbab 100755 (executable)
@@ -545,7 +545,14 @@ def check_config_file(checklist, fname):
         perform_checks(checklist, parsed_options)
 
         if debug_mode:
-            known_options = [opt.name for opt in checklist]
+            known_options = []
+            for opt in checklist:
+                if hasattr(opt, 'opts'):
+                    for o in opt.opts:
+                        if hasattr(o, 'name'):
+                            known_options.append(o.name)
+                else:
+                    known_options.append(opt.name)
             for option, value in parsed_options.items():
                 if option not in known_options:
                     print('DEBUG: dunno about option {} ({})'.format(option, value))