From: Alexander Popov Date: Sat, 7 Mar 2020 20:39:23 +0000 (+0300) Subject: Improve 'dunno' report in debug_mode X-Git-Tag: v0.5.5~22 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=92270e09d9338c34a28dc0e5b66af7be0ea07910;p=kconfig-hardened-check.git Improve 'dunno' report in debug_mode --- diff --git a/kconfig-hardened-check.py b/kconfig-hardened-check.py index e2d8483..79206d2 100755 --- a/kconfig-hardened-check.py +++ b/kconfig-hardened-check.py @@ -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))