Skip to content

Commit 586359d

Browse files
ulfalizernashif
authored andcommitted
check_compliance: Simplify undef.-ref.-within-Kconfig check a bit
Test for the string with all the warnings being empty instead of testing for an empty list. Signed-off-by: Ulf Magnusson <[email protected]>
1 parent b50b8ac commit 586359d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/ci/check_compliance.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,12 @@ def check_no_undef_within_kconfig(self, kconf):
265265
Checks that there are no references to undefined Kconfig symbols within
266266
the Kconfig files
267267
"""
268-
undef_ref_warnings = [warning for warning in kconf.warnings
269-
if "undefined symbol" in warning]
268+
undef_ref_warnings = "\n\n\n".join(warning for warning in kconf.warnings
269+
if "undefined symbol" in warning)
270270

271271
if undef_ref_warnings:
272272
self.add_failure("Undefined Kconfig symbols:\n\n"
273-
+ "\n\n\n".join(undef_ref_warnings))
273+
+ undef_ref_warnings)
274274

275275
def check_top_menu_not_too_long(self, kconf):
276276
"""

0 commit comments

Comments
 (0)