+
+
+def print_unknown_options(checklist: List[ChecklistObjType], parsed_options: Dict[str, str], opt_type: str) -> None:
+ known_options = []
+
+ for o1 in checklist:
+ if isinstance(o1, SimpleOptCheckTypes):
+ assert(o1.opt_type != 'complex'), f'{o1} with complex opt_type'
+ assert(not isinstance(o1, VersionCheck)), 'single VersionCheck in checklist'
+ known_options.append(o1.name)
+ continue
+ for o2 in o1.opts:
+ if isinstance(o2, SimpleOptCheckTypes):
+ assert(o2.opt_type != 'complex'), f'{o2} with complex opt_type'
+ if hasattr(o2, 'name'):
+ known_options.append(o2.name)
+ continue
+ for o3 in o2.opts:
+ assert(isinstance(o3, SimpleOptCheckTypes)), \
+ f'unexpected ComplexOptCheck inside {o2.name}'
+ assert(o3.opt_type != 'complex'), f'{o3} with complex opt_type'
+ if hasattr(o3, 'name'):
+ known_options.append(o3.name)
+
+ for option, value in parsed_options.items():
+ if option not in known_options:
+ print(f'[?] No check for {opt_type} option {option} ({value})')