Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/32257 )
Change subject: kconfig_lint: Make uses of CONFIG() on an unknown option an error ......................................................................
kconfig_lint: Make uses of CONFIG() on an unknown option an error
This check had very few false positives which were all easily resolved, and it's unlikely that further false positives will become problematic in the future. On the other hand, it does detect a very severe bug (when you think you're using a Kconfig but you aren't due to a typo), so since warnings are currently not very visible, let's turn this into an error because the pros clearly outweigh the cons for that.
Change-Id: I897b5e13d3242fb77b69f0bd3585baa7476aa726 Signed-off-by: Julius Werner jwerner@chromium.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/32257 Reviewed-by: Furquan Shaikh furquan@google.com Reviewed-by: Paul Menzel paulepanter@users.sourceforge.net Reviewed-by: Nico Huber nico.h@gmx.de Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M util/lint/kconfig_lint 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved Paul Menzel: Looks good to me, but someone else must approve Furquan Shaikh: Looks good to me, approved
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint index 4d0a755..502a618 100755 --- a/util/lint/kconfig_lint +++ b/util/lint/kconfig_lint @@ -47,7 +47,7 @@ my $exclude_dirs_and_files = '^build/|^coreboot-builds/|^configs/|^util/|^.git/|^payloads|^Documentation|^3rdparty' . '|' . # directories to exclude when searching for used symbols - '.config|.txt$|.tex$|.tags'; #files to exclude when looking for symbols + '.config|.txt$|.tex$|.tags|/kconfig.h'; #files to exclude when looking for symbols my $payload_files_to_check='payloads/Makefile.inc payloads/external/Makefile.inc'; my $config_file = ""; # name of config file to load symbol values from. my @wholeconfig; # document the entire kconfig structure @@ -314,7 +314,7 @@ } } else { - show_warning("CONFIG() used on unknown value ($symbol) at $file:$lineno."); + show_error("CONFIG() used on unknown value ($symbol) at $file:$lineno."); } } } elsif ( $line =~ /^([^:]+):(\d+):(.+IS_ENABLED.*)/ ) {