util/lint: Check files of all sizes for licenses

Signed-off-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Change-Id: Ib97d009c056b487136f20e5341b31183c65ef761
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66504
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
This commit is contained in:
Martin Roth 2022-08-07 17:21:17 -06:00 committed by Tim Wawrzynczak
parent 6dac0c54cd
commit 957fde633b
1 changed files with 2 additions and 4 deletions

View File

@ -124,10 +124,8 @@ check_for_license 'SPDX-License-Identifier: BSD-4-Clause-UC'
check_for_license 'SPDX-License-Identifier: CC-PDDC' check_for_license 'SPDX-License-Identifier: CC-PDDC'
for file in $headerlist; do for file in $headerlist; do
# Verify the file exists, and has content that requires a header # Verify the file actually exists
# This assumes that a file that has 4 lines or fewer is not notable if [ -f "$file" ]; then
# enough to require a license.
if [ -f "$file" ] && [ "$(wc -l < "$file")" -gt 4 ]; then
echo "$file has no recognized SPDX identifier." echo "$file has no recognized SPDX identifier."
fi fi
done done