RFR: 1357: Add Oracle copyright header format check to jcheck [v2]
Magnus Ihse Bursie
ihse at openjdk.org
Mon Dec 9 22:51:23 UTC 2024
On Thu, 5 Dec 2024 23:31:09 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
>> Zhao Song has updated the pull request incrementally with four additional commits since the last revision:
>>
>> - add copyright header
>> - version 2
>> - update
>> - review comment
>
> jcheck/src/main/java/org/openjdk/skara/jcheck/CopyrightCheck.java line 67:
>
>> 65: var copyrightFound = false;
>> 66: for (String line : lines) {
>> 67: if (line.contains("Copyright (c)") && line.contains("Oracle")) {
>
> I think it would be nice if we could work with pairs of regular expressions. One for identifying a line that should match and one that verifies the format. This way we could make it possible to add more variants through configuration.
>
> We could also consider not having any default and put the Oracle config in .jcheck/conf.
I'm not sure its better to have Oracle in the configuration file. It kind of just highlights it as a special case. If/when some other company requests special copyright checks, then we can generalize and move it to the configuration file. Also, it's never the case that this is just a per-repo setting: for Oracle-copyrighted code, this rule always applies.
-------------
PR Review Comment: https://git.openjdk.org/skara/pull/1702#discussion_r1872824149
More information about the skara-dev
mailing list