You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new requirements for the copyright header as of a few months are:
/**
* Copyright [first year code created] Adobe
* All rights reserved.
*/
(in various formats, depending on the file type: php, xml, less, js, ...)
Currently we only check with a regex on /Copyright (\d{4}) Adobe/, the second line is not being checked and also if anybody cares to add more lines above or below this one line, we also don't check on it.
Example here: magento/magento2-page-builder@33377b4:
ADOBE CONFIDENTIAL shouldn't be there
that whole section that starts with NOTICE: All information contained ... shouldn't be there
At the moment - due to technical limitations, or so I understood - the year a file was generated can't be detected in the pipelines checks that run on github, so that's hard to automate, even though it would be a nice bonus. I constantly see people adding wrong years to the copyright header.
Also, when the static test fails, we get this error "Copyright is missing or Copyright content/year is not valid" that doesn't help at all, there's no explanation in what is expected exactly and what is wrong. So the output should be more helpful by explicitly saying what needs to happen, or link to some documentation that explains this.
Expected behavior
Ideally, we should check for the copyright header to contain 2 lines as mentioned above, nothing more, nothing less.
Bonus: figure out a technical solution to determine the year a file was first added in git and enforce that year to be used in the copyright header.
Benefits
Stop having Adobe developers from not following the correct instructions, and help outside contributors from not being confused when they get the error "Copyright is missing or Copyright content/year is not valid" to tell them exactly what to implement.
Additional information
The text was updated successfully, but these errors were encountered:
Hi @hostep. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this
Description
The new requirements for the copyright header as of a few months are:
(in various formats, depending on the file type: php, xml, less, js, ...)
Currently we only check with a regex on
/Copyright (\d{4}) Adobe/
, the second line is not being checked and also if anybody cares to add more lines above or below this one line, we also don't check on it.Example here: magento/magento2-page-builder@33377b4:
ADOBE CONFIDENTIAL
shouldn't be thereNOTICE: All information contained ...
shouldn't be thereAt the moment - due to technical limitations, or so I understood - the year a file was generated can't be detected in the pipelines checks that run on github, so that's hard to automate, even though it would be a nice bonus. I constantly see people adding wrong years to the copyright header.
Also, when the static test fails, we get this error "Copyright is missing or Copyright content/year is not valid" that doesn't help at all, there's no explanation in what is expected exactly and what is wrong. So the output should be more helpful by explicitly saying what needs to happen, or link to some documentation that explains this.
Expected behavior
Ideally, we should check for the copyright header to contain 2 lines as mentioned above, nothing more, nothing less.
Bonus: figure out a technical solution to determine the year a file was first added in git and enforce that year to be used in the copyright header.
Benefits
Stop having Adobe developers from not following the correct instructions, and help outside contributors from not being confused when they get the error "Copyright is missing or Copyright content/year is not valid" to tell them exactly what to implement.
Additional information
The text was updated successfully, but these errors were encountered: