Skip to content

Commit ba2a221

Browse files
committed
Arm backend: Fix pre-push copyright header detection
The license check used any Arm substring in the first header lines to decide whether a file had an Arm copyright header. That misclassified files with includes such as arm_neon.h as having an Arm header, then failed them when the current Arm year was absent. Match the actual Arm copyright line instead so non-Arm headers are skipped while real Arm headers still get the year check. Signed-off-by: Per Held <per.held@arm.com> Change-Id: Iafda07d8e2cf379672939a268fc3c39fc0ab895e
1 parent 7f19a2e commit ba2a221

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

backends/arm/scripts/pre-push

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ for COMMIT in ${COMMITS}; do
184184
esac
185185

186186
file_header=$(head "$committed_file")
187-
if ! echo "$file_header" | grep -qi "Arm"; then
187+
arm_copyright_regex="Copyright .*Arm Limited and/or its affiliates"
188+
if ! echo "$file_header" | grep -Eqi "$arm_copyright_regex"; then
188189
echo -e "${WARNING} No Arm copyright header in ${committed_file}"\
189190
" (skipping license year check)"
190191
continue

0 commit comments

Comments
 (0)