[coreboot-gerrit] New patch to review for coreboot: util/lint: update lint-000-license-headers

Martin Roth (martinroth@google.com) gerrit at coreboot.org
Tue Apr 12 04:59:28 CEST 2016


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

-gerrit

commit f7aaf794c25900c13a38a9bb7bdb8761895dfb56
Author: Martin Roth <martinroth at google.com>
Date:   Mon Apr 11 13:35:59 2016 -0600

    util/lint: update lint-000-license-headers
    
    - Add some additional filters for files that do not require
    license headers.
    - Add an alternative wording for the BSD license that is used
    in several files.
    - Add string for dummy files
    - Stop checking if there are no files left.
    
    Change-Id: I2ed1b0572b5fbe84ea86173b7ec2106454399547
    Signed-off-by: Martin Roth <martinroth at google.com>
---
 util/lint/lint-000-license-headers | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/util/lint/lint-000-license-headers b/util/lint/lint-000-license-headers
index 884875e..eee50d5 100755
--- a/util/lint/lint-000-license-headers
+++ b/util/lint/lint-000-license-headers
@@ -40,7 +40,14 @@ EXAMPLE|\
 _shipped$|\
 /microcode-[^/]*.h$|\
 /sdram-.*\.inc$|\
-Makefile\.inc\
+Makefile\.inc|\
+\.fmd|\
+devicetree.cb|\
+\.cfg$|\
+\.spd|\
+config|\
+cmos\.layout|\
+cmos\.default\
 "
 
 #space separated list of directories to test
@@ -58,9 +65,9 @@ headerlist=$(git ls-files $HEADER_DIRS | egrep -v "($HEADER_EXCLUDED)")
 
 #update headerlist by removing files that match the license string
 check_for_license() {
-	if [ -z "$2" ]; then
+	if [ -n "$headerlist" ] && [ -z "$2" ]; then
 		headerlist="$(grep -iL "$1" $headerlist 2>/dev/null)"
-	else
+	elif [ -n "$headerlist" ]; then
 		local p1list="$(grep -il "$1" $headerlist 2>/dev/null)"
 		local p2list="$(grep -il "$2" $headerlist 2>/dev/null)"
 
@@ -80,8 +87,10 @@ check_for_license() {
 check_for_license "under the terms of the GNU General Public License" \
 		"WITHOUT ANY WARRANTY"
 check_for_license 'IS PROVIDED .*"AS IS"'
+check_for_license 'IS DISTRIBUTED .*"AS IS"'
 check_for_license "IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE"
 check_for_license '"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES'
+check_for_license 'No license required'
 
 for file in $headerlist; do
 	#verify the file exists, and has content that requires a header



More information about the coreboot-gerrit mailing list