-
Notifications
You must be signed in to change notification settings - Fork 41
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
Remove copyright year in generated code #74
Conversation
The generated code would get new year if there was a change in the code. If we want to keep copyright year up to date even in files that were not changed since last year - would you consider also updating the year in the rest of the files? Anyone knows what's the policy in general? I have been updating copyright year to current only in files that are were changed in the current year. |
The usual approach in Kubernetes is to set the copyright year the first time that a file gets created and then not update it again later, not even when editing the file. Instead of injecting a varying year, I would copy some fixed year from the input files into the generated files - but I haven't looked into details here. |
f0bee95
to
a80dc6a
Compare
It seems the pattern at least in k/k is to omit the copyright year in generated code, so I applied that here as well. s/Update/Remove/: /retitle Remove copyright year in generated code |
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.
hack/boilerplate.go.txt is no longer referenced, but I left it in the repo in case that's useful for when something like a make verify-boilerplate
target is introduced. Happy to remove it though now if we only want to add it back once we need it.
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: klueska, nojnhuh, pohly The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Since the Makefile instructs controller-gen to inject the current year into the code it generates, the turn of the calendar has caused it to become out of date. Alternatively, we could remove the year entirely to keep from having to do this annually:
dra-example-driver/Makefile
Line 111 in f0bee95
dra-example-driver/hack/boilerplate.go.txt
Line 2 in f0bee95