Hi team
While reviewing the recent changes in ACP2E-4995 (.github/scripts/check_copyright_pr.php), I noticed a normalization behavior that may be worth validating.
Observation
The normalizeHeader() implementation removes hyphens during comparison:
return strtolower((string) preg_replace('/[\s#/*-<>!?[]]+/', '', $text));
This means copyright headers containing year ranges such as:
Copyright © 2024-2026 Adobe
are normalized differently than headers that use a single year format.
Question
Can maintainers confirm that:
buildExpectedHeader()
extractCopyrightBlock()
always produce equivalent normalized output for valid copyright formats, including year ranges such as 2024-2026?
Suggested Verification
- Create a file containing:
Copyright © 2024-2026 Adobe
All Rights Reserved.
-
Modify the file in a PR without changing the copyright block.
-
Run check_copyright_pr.php.
-
Verify the existing-file validation path does not incorrectly report a copyright mismatch.
Potential Impact
If different valid copyright formats normalize differently between the expected-header path and extracted-header path, CI could reject valid PRs with a copyright validation error.
Diff analyzed: 9c5a46f → 9b09c80
Hi team
While reviewing the recent changes in ACP2E-4995 (
.github/scripts/check_copyright_pr.php), I noticed a normalization behavior that may be worth validating.Observation
The
normalizeHeader()implementation removes hyphens during comparison:return strtolower((string) preg_replace('/[\s#/*-<>!?[]]+/', '', $text));
This means copyright headers containing year ranges such as:
Copyright © 2024-2026 Adobe
are normalized differently than headers that use a single year format.
Question
Can maintainers confirm that:
buildExpectedHeader()extractCopyrightBlock()always produce equivalent normalized output for valid copyright formats, including year ranges such as
2024-2026?Suggested Verification
Copyright © 2024-2026 Adobe
All Rights Reserved.
Modify the file in a PR without changing the copyright block.
Run
check_copyright_pr.php.Verify the existing-file validation path does not incorrectly report a copyright mismatch.
Potential Impact
If different valid copyright formats normalize differently between the expected-header path and extracted-header path, CI could reject valid PRs with a copyright validation error.
Diff analyzed:
9c5a46f→9b09c80