From ab2d777360e8105007eef2911db26fd23c1ead14 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Mon, 25 Jan 2016 16:45:14 -0700 Subject: kconfig_lint: Skip temp files when looking for unused Kconfig files. Don't warn on Kconfig.orig and Kconfig~ files when trying to verify that all the Kconfig files in the coreboot source tree are being loaded. Change-Id: Ie7babe60b29735e5ccc5f93f4e42ad82dfb47044 Signed-off-by: Martin Roth Reviewed-on: https://review.coreboot.org/13462 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- util/lint/kconfig_lint | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'util/lint') diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint index 2fbaf97f5c..bec86e4be8 100755 --- a/util/lint/kconfig_lint +++ b/util/lint/kconfig_lint @@ -1168,7 +1168,11 @@ sub print_wholeconfig { #------------------------------------------------------------------------------- sub check_if_file_referenced { my $filename = $File::Find::name; - if ( ( $filename =~ /Kconfig/ ) && ( !exists $loaded_files{$filename} ) ) { + if ( ( $filename =~ /Kconfig/ ) + && ( !$filename =~ /\.orig$/ ) + && ( !$filename =~ /~$/ ) + && ( !exists $loaded_files{$filename} ) ) + { show_warning("'$filename' is never referenced"); } } -- cgit v1.2.3