mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: util/lint: Don't check license text for files with under 5 lines
BUG=none
BRANCH=none
TEST=none
Change-Id: Ie3271826bc6a5094d3a376a0a44a7be5e3c696c9
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: 03e9d6aa13
Original-Change-Id: I7c1e3cf558d447838819b4d6a63d93d48d5f13e0
Original-Signed-off-by: Martin Roth <martinroth@google.com>
Original-Reviewed-on: https://review.coreboot.org/18316
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Jonathan Neuschfer <j.neuschaefer@gmx.net>
Original-Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://chromium-review.googlesource.com/443679
This commit is contained in:
parent
4f5557ecdd
commit
527b3c1da5
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue