[coreboot-gerrit] Patch set updated for coreboot: util/lint: update lint-000-license-headers

Martin Roth (martinroth@google.com) gerrit at coreboot.org
Tue Apr 12 18:40:39 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 c9ed089f316b9c2e043be6e8985ae78d5c7a7b77
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.
    - Remove 'local' keyword which is not posix compliant.
    
    Change-Id: I2ed1b0572b5fbe84ea86173b7ec2106454399547
    Signed-off-by: Martin Roth <martinroth at google.com>
---
 util/lint/lint-000-license-headers | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/util/lint/lint-000-license-headers b/util/lint/lint-000-license-headers
index 884875e..16bec94 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,14 +65,14 @@ 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
-		local p1list="$(grep -il "$1" $headerlist 2>/dev/null)"
-		local p2list="$(grep -il "$2" $headerlist 2>/dev/null)"
+	elif [ -n "$headerlist" ]; then
+		p1list="$(grep -il "$1" $headerlist 2>/dev/null)"
+		p2list="$(grep -il "$2" $headerlist 2>/dev/null)"
 
 		# Make list of files that were in both previous lists
-		local pbothlist="$(echo $p1list $p2list | tr ' ' "\n" | \
+		pbothlist="$(echo $p1list $p2list | tr ' ' "\n" | \
 			sort | uniq -d)"
 
 		# Remove all files that were in both of the previous lists
@@ -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