[coreboot-gerrit] Patch set updated for coreboot: kconfig_lint: exclude payloads from search, add back specific files

Martin Roth (martinroth@google.com) gerrit at coreboot.org
Thu Nov 24 01:28:20 CET 2016


Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17443

-gerrit

commit 632bd8eee9734c054204accddb45462812e86a34
Author: Martin Roth <martinroth at google.com>
Date:   Tue Nov 15 21:08:42 2016 -0700

    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 at google.com>
---
 util/lint/kconfig_lint | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint
index 064f3db..4d2b90b 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;



More information about the coreboot-gerrit mailing list