summaryrefslogtreecommitdiff
path: root/util/lint/lint-000-license-headers
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2017-02-09 16:44:24 -0800
committerMartin Roth <martinroth@google.com>2017-02-14 18:37:40 +0100
commit03e9d6aa13f474ab980779366b7a6c8593721be6 (patch)
treebfa9d8de7858b1a7944e4190a04999bb7f68618b /util/lint/lint-000-license-headers
parent7a0044bf985941671725f8be94f0f1e04749a11f (diff)
downloadcoreboot-03e9d6aa13f474ab980779366b7a6c8593721be6.tar.xz
util/lint: Don't check license text for files with under 5 lines
Change-Id: I7c1e3cf558d447838819b4d6a63d93d48d5f13e0 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/18316 Tested-by: build bot (Jenkins) Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Diffstat (limited to 'util/lint/lint-000-license-headers')
-rwxr-xr-xutil/lint/lint-000-license-headers6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/lint/lint-000-license-headers b/util/lint/lint-000-license-headers
index 0d2a3af5e8..e705929ce5 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