[coreboot-gerrit] New patch to review for coreboot: kconfig_lint: update lint script

Martin Roth (martinroth@google.com) gerrit at coreboot.org
Sun Jan 31 23:35:28 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/13542

-gerrit

commit ad1e0637d73af48f7f4f632a2e3c90c6b0a66d7a
Author: Martin Roth <martinroth at google.com>
Date:   Sun Jan 31 14:35:48 2016 -0700

    kconfig_lint: update lint script
    
    - Enable warnings in addition to errors
    - Use git grep if the code is in a git repo now that exclusions are
    working.
    - Add check for perl, and a way to disable the script locally if
    perl isn't installed.
    
    Change-Id: Ie60d21f4ef8a61d879f116eb2056eb805b0a55f2
    Signed-off-by: Martin Roth <martinroth at google.com>
---
 util/lint/lint-008-kconfig | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/util/lint/lint-008-kconfig b/util/lint/lint-008-kconfig
index 16ae251..182f33c 100755
--- a/util/lint/lint-008-kconfig
+++ b/util/lint/lint-008-kconfig
@@ -15,4 +15,22 @@
 # DESCR: check Kconfig files
 
 LC_ALL=C export LC_ALL
-env perl util/lint/kconfig_lint --no_git_grep --warnings_off
+
+# Give users a way to disable the test locally if they don't have perl installed
+if [ -e "util/lint/.no_kconfig_lint_check" ]; then
+	exit 0
+fi
+
+# Verify that the test can run, tell users the issue
+if [ -z "$(command -v perl)" ]; then
+	echo "The kconfig lint tool uses perl.  Please install it or create the"
+	echo "file util/lint/.no_kconfig_lint_check to disable this test locally"
+fi
+
+# If coreboot is in a git repo, use git grep to check as it will ignore any
+# files in the tree that aren't checked into git
+if [ -z "$(command -v git)" ] || [ -e ".git" ]; then
+	env perl util/lint/kconfig_lint --no_git_grep
+else
+	env perl util/lint/kconfig_lint
+fi



More information about the coreboot-gerrit mailing list