util/lint: Make usage of IS_ENABLED() an error

As long as we keep the IS_ENABLED() definition in libpayload for
compatibility, we should check that IS_ENABLED() usage doesn't
sneak back in.

Also remove all other IS_ENABLED() checks.

Change-Id: Id30ffa0089cec6c24fc3dbbb10a1be35f63b3d89
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32229
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Nico Huber
2019-04-06 16:09:46 +02:00
parent 086149eb32
commit ec017590e5
3 changed files with 16 additions and 57 deletions

View File

@@ -49,9 +49,7 @@ Warnings in Kconfig files:
globs are excluded from this check.
Warnings in coreboot source files:
- 'IS_ENABLED()' block that could not be interpreted.
- Kconfig files that are not loaded by a 'source' keyword.
- IS_ENABLED() used on a Kconfig (deprecated in favor of CONFIG())
- Naked use of boolean CONFIG_XXX Kconfig in C that's not wrapped in CONFIG()
Errors in Kconfig files:
@@ -96,8 +94,8 @@ Errors in coreboot source files:
symbols.
- '#ifdef' or '#if defined' used on bool, int, or hex - these are always
defined in coreboot's version of Kconfig.
- The CONFIG() and IS_ENABLED() macros is only valid for bool symbols.
- CONFIG() or IS_ENABLED() used on unknown Kconfig, like an obsolete symbol.
- The IS_ENABLED() macro is used on a symbol without the CONFIG_ prefix.
- The CONFIG() macro is only valid for bool symbols.
- CONFIG() used on unknown Kconfig, like an obsolete symbol.
- The deprecated IS_ENABLED() macro is used.
TODO: check for choice entries at the top level