From: Alexander Popov Date: Sun, 19 Jun 2022 19:38:23 +0000 (+0300) Subject: Move the add_cmdline_checks() call earlier X-Git-Tag: v0.6.1~139 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=a23725c2fa2b95dc0b8af0e9570b3a88787fbfd6;p=kconfig-hardened-check.git Move the add_cmdline_checks() call earlier populate_with_data() must be called after all checks have been added. --- diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index d1c77d0..2938c98 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -864,6 +864,10 @@ def main(): # add relevant kconfig checks to the checklist add_kconfig_checks(config_checklist, arch) + if args.cmdline: + # add relevant cmdline checks to the checklist + add_cmdline_checks(config_checklist, arch) + # populate the checklist with the parsed kconfig data parsed_kconfig_options = OrderedDict() parse_kconfig_file(parsed_kconfig_options, args.config) @@ -871,9 +875,6 @@ def main(): populate_with_data(config_checklist, kernel_version, 'version') if args.cmdline: - # add relevant cmdline checks to the checklist - add_cmdline_checks(config_checklist, arch) - # populate the checklist with the parsed kconfig data parsed_cmdline_options = OrderedDict() parse_cmdline_file(parsed_cmdline_options, args.cmdline)