Skip to content
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

x/tools/godoc/static, x/website/content/static: hardcode copyright year in static.go to be the year the file was first created #36360

Closed
dmitshur opened this issue Jan 2, 2020 · 2 comments
Assignees
Labels
Milestone

Comments

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Jan 2, 2020

Based on my reading of https://golang.org/doc/contribute.html#copyright:

Files in the repository are copyrighted the year they are added. Do not update the copyright year on files that you change.

There shouldn't be a need to keep updating the copyright year in the generated static.go to be the current year, causing TestStaticIsUpToDate to fail at the beginning of each year and needing to be regenerated (e.g., see CL 156077, CL 156079 and CL 213037).

/cc @bradfitz @stamblerre @heschik

@gopherbot gopherbot added this to the Unreleased milestone Jan 2, 2020
@gopherbot gopherbot added the Tools label Jan 2, 2020
@dmitshur dmitshur changed the title x/tools/godoc/static: hardcode copyright year to be the year the file was first created x/tools/godoc/static, x/website/content/static: hardcode copyright year to be the year the file was first created Jan 2, 2020
@dmitshur dmitshur changed the title x/tools/godoc/static, x/website/content/static: hardcode copyright year to be the year the file was first created x/tools/godoc/static, x/website/content/static: hardcode copyright year in static.go to be the year the file was first created Jan 2, 2020
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jan 2, 2020

Change https://golang.org/cl/213119 mentions this issue: godoc/static: update copyright year to 2013

gopherbot pushed a commit to golang/tools that referenced this issue Jan 2, 2020
The generated static.go file was missing a license header when it was
created in 2013 in CL 12805046. CL 38165 added a license header, using
the current year in the template. This causes the static.go file to go
"out of date" whenever the year changes.

Change the copyright year to be a fixed year when the file was created.
This way, the TestStaticIsUpToDate test will stop breaking every year.

Updates golang/go#36360
Updates golang/go#11811

Change-Id: If1597b0d93b7eacf23b7de103a6d7e3ca049bb4f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/213119
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jan 2, 2020

Change https://golang.org/cl/213121 mentions this issue: content/static: generate constant 2019 copyright year

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.