projects
/
kconfig-hardened-check.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
866d3c0
)
Add more ComplexOptCheck validation
author
Alexander Popov
<alex.popov@linux.com>
Mon, 14 Feb 2022 16:50:21 +0000
(19:50 +0300)
committer
Alexander Popov
<alex.popov@linux.com>
Mon, 14 Feb 2022 22:03:00 +0000
(
01:03
+0300)
kconfig_hardened_check/__init__.py
patch
|
blob
|
history
diff --git
a/kconfig_hardened_check/__init__.py
b/kconfig_hardened_check/__init__.py
index 12edc9f9d3c06e617261ef4537f2edd95d0ebd54..d69dded085a9d55763e693fe540c59be0f892a47 100644
(file)
--- a/
kconfig_hardened_check/__init__.py
+++ b/
kconfig_hardened_check/__init__.py
@@
-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