-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[chores] Revert copyright start year + polish #2732
Conversation
This reverts commit 6fa6182. The start year MUST reflect the actual year the _content_ of the file (copyrighted material) has been created.
- scrabble classes copyright notice was not originally completely clean and will need to be improved separately - NonNull/NonNullApi/Nullable annotations have been taken from Spring with original copyright notice
Most files were missing the header altogether. Introduced header in that case was manually edited to include the proper start year at which each class was created. reactor/util/concurrent/MpscLinkedQueue.java had a notice between the copyright notice block and the package statement, which could get erased by spotlessApply, so it was moved next to class javadoc. A few changed classes here deal with deleting duplicated copyright notice blocks. See reactor/reactor#682.
421bf5a
to
f89d73f
Compare
@@ -28,6 +24,10 @@ | |||
|
|||
import reactor.util.annotation.Nullable; | |||
|
|||
/* | |||
* The code was inspired by the similarly named JCTools class: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was moved otherwise spotlessApply would erase it (if before the package
statement)
Most files were missing the header altogether. Introduced header in that case was manually edited to include the proper start year at which each class was created. reactor/util/concurrent/MpscLinkedQueue.java had a notice between the copyright notice block and the package statement, which could get erased by spotlessApply, so it was moved next to class javadoc. A few changed classes here deal with deleting duplicated copyright notice blocks. See reactor/reactor#682.
f89d73f
to
0afe4c1
Compare
By using `-PspotlessFrom=ALL` one can disable ratchetting entirely.
b1804a7
to
7091634
Compare
We can now ignore ratchetting with `ALL`. In this commit we use that and the spotless feature that slurps years from git history: ```bash gradle spotlessApply -PspotlessSetLicenseHeaderYearsFromGitHistory=true -PspotlessFrom=ALL ``` The following command has been used to get a bird's eye view of the automated change from spotless: ```bash git diff -U0 | grep "^[+-]" | grep --invert-match "^[+-][+-][+-]" | sort | uniq --count ``` which gave: ``` 255 + 87 + * Copyright (c) 2015-2021 VMware Inc. or its affiliates, All Rights Reserved. 492 + * Copyright (c) 2016-2021 VMware Inc. or its affiliates, All Rights Reserved. 122 + * Copyright (c) 2017-2021 VMware Inc. or its affiliates, All Rights Reserved. 39 + * Copyright (c) 2018-2021 VMware Inc. or its affiliates, All Rights Reserved. 17 + * Copyright (c) 2019-2021 VMware Inc. or its affiliates, All Rights Reserved. 12 + * Copyright (c) 2020-2021 VMware Inc. or its affiliates, All Rights Reserved. 4 + * Copyright (c) 2021 VMware Inc. or its affiliates, All Rights Reserved. 761 - * Copyright (c) 2011-2021 VMware Inc. or its affiliates, All Rights Reserved. 8 - * Copyright (c) 2019-2021 VMware Inc. or its affiliates, All Rights Reserved. 4 - * Copyright (c) 2020-2021 VMware Inc. or its affiliates, All Rights Reserved. ``` Thus it appears the change only touched copyright notice lines, without any pattern standing out. Reviewed-in: #2733
This reverts commit 6fa6182. The start year MUST reflect the actual year the _content_ of the file (copyrighted material) has been created.
@simonbasle this PR seems to have been merged on a maintenance branch, please ensure the change is merge-forwarded to intermediate maintenance branches and up to |
- scrabble classes copyright notice was not originally completely clean and will need to be improved separately - NonNull/NonNullApi/Nullable annotations have been taken from Spring with original copyright notice
Most files were missing the header altogether. Introduced header in that case was manually edited to include the proper start year at which each class was created. reactor/util/concurrent/MpscLinkedQueue.java had a notice between the copyright notice block and the package statement, which could get erased by spotlessApply, so it was moved next to class javadoc. A few changed classes here deal with deleting duplicated copyright notice blocks. See reactor/reactor#682.
By using `-PspotlessFrom=ALL` one can disable ratchetting entirely.
forward merge done, but newly introduced files in 3.4.x have not been reviewed/fixed. will do this in a separate PR, given the breadth of the change and the need to apply the spotless recompute from git task on new files. |
This commit polishes the merge of #2732 and reviews the start year of copyright notice headers for files that have been introduced in 3.4.x or otherwise differ from 3.3.x (for example main's NextProcessor derives from 3.3.x's MonoProcessor).
This commit polishes the merge of #2732 and reviews the start year of copyright notice headers for files that have been introduced in 3.4.x or otherwise differ from 3.3.x (for example main's NextProcessor derives from 3.3.x's MonoProcessor).
This reverts the change of start date, then using Spotless without a ratchet to
detect files that were still missing a copyright notice header.
Spotless should actually correctly detect and update
end
in both the rangecase (
start-end
), the early single year case (start
tostart-end
) and thecurrent year as single year case (
end
, kept as is).Unfortunately, locally this gives a lot of "noisy" changes because the blank
line after the notice had not been enforced in #2722, while spotlessApply does
enforce it.
Such blank-line-only changes were not added to the commit, thanks to the
following command:
The other thing is that applying
spotless
to the whole codebase surfaced a fewfiles that have different copyright header (scrabble and annotations). These
have been excluded from spotless for now.
Follow-up to #2722, see reactor/reactor#682