-
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
[build] Use Spotless plugin to enforce/update copyright headers #2729
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
simonbasle
added
the
type/chores
A task not related to code (build, formatting, process, ...)
label
Jun 28, 2021
This only applies to .java files changed compared to the origin base branch (3.3.x), and excluding JDK stubs. This allows to enforce license header with up-to-date end year only when a file get touched (no need for a big bang update of the end year in all files comes new year). The year variable in the template is compatible with IntelliJ's own template format (velocity), although IntelliJ doesn't typically include the comment characters like in the added template file. The template includes 2 blank lines at the end so that one blank line remains after the license header once spotless is applied. The ratchet (apply spotless only to files that changed between current commit and the specified branch) is adapted depending on local build, CI build without any specific parameter and CI build explicitly intended for spotless (thanks to `-PspotlessFrom=branch`). The later is necessary because spotless needs a full checkout, which is typically not done by default by CI platforms like GitHub Actions.
simonbasle
force-pushed
the
spotlessCopyrightOnly
branch
from
June 29, 2021 14:14
6d2f4ab
to
c4f40f2
Compare
simonbasle
changed the title
Add spotless plugin and enforce header for java files
[build] Use Spotless plugin to enforce/update copyright headers
Jun 30, 2021
violetagg
approved these changes
Jun 30, 2021
11 tasks
mmh actually, I'll revert the rename of the job so that there is continuity in the "required checks" of github actions |
violetagg
approved these changes
Jun 30, 2021
@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 |
simonbasle
added a commit
that referenced
this pull request
Jun 30, 2021
Changed the default branch to `main` for ratchet.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This only applies to .java files changed compared to the origin base
branch (3.3.x), and excluding JDK stubs.
This allows to enforce license header with up-to-date end year only when
a file get touched (no need for a big bang update of the end year in
all files comes new year).
The year variable in the template is compatible with IntelliJ's own
template format (velocity), although IntelliJ doesn't typically include
the comment characters like in the added template file.
The template includes 2 blank lines at the end so that one blank line
remains after the license header once spotless is applied.
The ratchet (apply spotless only to files that changed between current
commit and the specified branch) is adapted depending on local build,
CI build without any specific parameter and CI build explicitly intended
for spotless (thanks to
-PspotlessFrom=branch
). The later is necessarybecause spotless needs a full checkout, which is typically not done by
default by CI platforms like GitHub Actions.
See reactor/reactor#701
See also reactor/reactor#700 for the initial goal of including basic
formatting.