Add more ComplexOptCheck validation
[kconfig-hardened-check.git] / kconfig_hardened_check / __init__.py
index 12edc9f9d3c06e617261ef4537f2edd95d0ebd54..d69dded085a9d55763e693fe540c59be0f892a47 100644 (file)
@@ -175,6 +175,8 @@ class ComplexOptCheck:
         self.opts = opts
         if not self.opts:
             sys.exit('[!] ERROR: empty {} check'.format(self.__class__.__name__))
+        if len(self.opts) == 1:
+            sys.exit('[!] ERROR: useless {} check'.format(self.__class__.__name__))
         if not isinstance(opts[0], KconfigCheck):
             sys.exit('[!] ERROR: invalid {} check: {}'.format(self.__class__.__name__, opts))
         self.result = None