[coreboot-gerrit] New patch to review for coreboot: util/line: Don't check license text for files with under 5 lines
Martin Roth (martinroth@google.com)
gerrit at coreboot.org
Fri Feb 10 01:44:36 CET 2017
Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18316
-gerrit
commit f05d5a3385680d15fc60d9edf410bbaed38dce04
Author: Martin Roth <martinroth at google.com>
Date: Thu Feb 9 16:44:24 2017 -0800
util/line: Don't check license text for files with under 5 lines
Change-Id: I7c1e3cf558d447838819b4d6a63d93d48d5f13e0
Signed-off-by: Martin Roth <martinroth at google.com>
---
util/lint/lint-000-license-headers | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/util/lint/lint-000-license-headers b/util/lint/lint-000-license-headers
index 0d2a3af..e705929 100755
--- a/util/lint/lint-000-license-headers
+++ b/util/lint/lint-000-license-headers
@@ -93,8 +93,10 @@ 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
- if [ -f "$file" ] && [ "$(wc -l < "$file")" -ne 0 ]; then
+ # Verify the file exists, and has content that requires a header
+ # This assumes that a file that has 4 lines or fewer is not notable
+ # enough to require a license.
+ if [ -f "$file" ] && [ "$(wc -l < "$file")" -gt 4 ]; then
echo "$file has no recognized license header."
fi
done
More information about the coreboot-gerrit
mailing list