From e69c58d7c8dcb327b1d3d5208870e3655a1cd255 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Tue, 15 Nov 2016 21:08:42 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/17443 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- util/lint/kconfig_lint | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'util') 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; -- cgit v1.2.3