aboutsummaryrefslogtreecommitdiff
path: root/util/lint/kconfig_lint
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2016-11-15 21:08:42 -0700
committerMartin Roth <martinroth@google.com>2016-11-28 01:05:01 +0100
commite69c58d7c8dcb327b1d3d5208870e3655a1cd255 (patch)
treeb3863483e017f8ec8ed0de626039fa66011cd29d /util/lint/kconfig_lint
parente74ad21a91e33f275a7bda999b058a8390c44ae6 (diff)
kconfig_lint: exclude payloads from search, add back specific files
Don't search for symbols in the payloads directory, except for specific files that are actively added back to the search. Change-Id: I6f28dc7dee040b8061fa5644066f3613367b6d84 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17443 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/lint/kconfig_lint')
-rwxr-xr-xutil/lint/kconfig_lint7
1 files changed, 4 insertions, 3 deletions
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint
index 064f3db33f..4d2b90bef1 100755
--- a/util/lint/kconfig_lint
+++ b/util/lint/kconfig_lint
@@ -45,9 +45,10 @@ my $root_dir = "src"; # Directory of the top level Kconfig file
my $errors_found = 0; # count of errors
my $warnings_found = 0;
my $exclude_dirs_and_files =
- '^build/\|^coreboot-builds/\|^payloads/libpayload\|^payloads/coreinfo\|^configs/\|^util/\|^\.git/'
+ '^build/\|^coreboot-builds/\|^configs/\|^util/\|^\.git/\|^payloads'
. '\|' . # directories to exclude when searching for used symbols
'\.txt$\|\.tex$\|\.tags'; #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
my %loaded_files; # list of each Kconfig file loaded
@@ -410,10 +411,10 @@ sub collect_used_symbols {
# find all references to CONFIG_ statements in the tree
if ($dont_use_git_grep) {
- @collected_symbols = `grep -Irn -- "CONFIG_" | grep -v '$exclude_dirs_and_files'`;
+ @collected_symbols = `grep -Irn -- "CONFIG_" | grep -v '$exclude_dirs_and_files'; grep -In -- "CONFIG_" $payload_files_to_check`;
}
else {
- @collected_symbols = `git grep -In -- "CONFIG_" | grep -v '$exclude_dirs_and_files'`;
+ @collected_symbols = `git grep -In -- "CONFIG_" | grep -v '$exclude_dirs_and_files'; git grep -In -- "CONFIG_" $payload_files_to_check`;
}
my @used_symbols = @collected_symbols;