[coreboot-gerrit] Patch merged into coreboot/master: lint: Add Kconfig / Kconfig symbol lint tool
gerrit at coreboot.org
gerrit at coreboot.org
Thu Oct 29 17:05:10 CET 2015
the following patch was just integrated into master:
commit bcaaad1c55c2f1402da1a5dda9dfe3d6b4f07b40
Author: Martin Roth <martinroth at google.com>
Date: Sun Oct 18 11:16:25 2015 -0600
lint: Add Kconfig / Kconfig symbol lint tool
This is a tool to help identify issues in coreboot's Kconfig structure
and in how the Kconfig symbols are used in the coreboot codebase.
It identifies a number of issues:
- #ifdef used on Kconfig symbol of type bool, hex, or int. These are
always defined.
- #define CONFIG_ in the coreboot code - these should be reserved
for Kconfig symbols.
- Redefinition of Kconfig symbols in the code.
- Use of IS_ENABLED() on non-bool kconfig symbols.
- Use of IS_ENABLED() on values that are not kconfig symbols.
- Attempts to find default values that will not set anything
because of earlier default settings. This needs to be expanded
significantly.
- Kconfig expressions using symbols which are not defined.
- Kconfig symbols that are defined but not used anywhere in the
Kconfig structure or coreboot code.
- Kconfig keywords used incorrectly.
- Whitespace issues
- Kconfig 'source' keyword issues
-- sourcing non-existant directories
-- sourcing Kconfig files multiple times
-- sourcing non-existent files
-- Kconfig files in the codebase that are never sourced
Additionally, it can be used to help debug the Kconfig tree
by putting all the files together into a single file with
their source locations listed.
Run from the coreboot directory:
util/lint/kconfig_lint
Change-Id: Ia53b366461698d949f17502e99265c1f3f3b1443
Signed-off-by: Martin Roth <martinroth at google.com>
Reviewed-on: http://review.coreboot.org/12088
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
See http://review.coreboot.org/12088 for details.
-gerrit
More information about the coreboot-gerrit
mailing list