print(f'[+] Config check is finished: \'OK\' - {ok_count}{ok_suppressed} / \'FAIL\' - {fail_count}{fail_suppressed}')
-def parse_kconfig_file(mode, parsed_options, fname):
+def parse_kconfig_file(_mode, parsed_options, fname):
with _open(fname, 'rt', encoding='utf-8') as f:
opt_is_on = re.compile(r"CONFIG_[a-zA-Z0-9_]+=.+$")
opt_is_off = re.compile(r"# CONFIG_[a-zA-Z0-9_]+ is not set$")
else:
kernel_version, msg = detect_kernel_version(args.config)
if kernel_version is None:
- if not args.kernel_version:
+ if args.kernel_version is None:
print('[!] Hint: provide the kernel version file through --kernel-version option')
sys.exit(f'[!] ERROR: {msg}')
if mode != 'json':
for opt in config_checklist:
if opt.name == 'CONFIG_ARCH_MMAP_RND_BITS':
continue # don't add CONFIG_ARCH_MMAP_RND_BITS because its value needs refinement
+ if opt.expected == 'is not off':
+ continue # don't add Kconfig options without explicitly recommended values
if opt.expected == 'is not set':
print(f'# {opt.name} is not set')
else: