8000 Add missing license headers. by ssbr · Pull Request #55 · google/addlicense · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add missing license headers. #55

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add missing license headers. #55

wants to merge 2 commits into from

Conversation

ssbr
Copy link
@ssbr ssbr commented Oct 26, 2020

From https://opensource.google/docs/releasing/preparing/ :

BEST PRACTICE: Add license headers to any files that can be added to (i.e. anything that takes the format of a source file and supports file comments). This would include things like YAML files.

I believe this very directly applies to .travis.yml, and reasonably also applies to Dockerfile. Wasn't sure what year to put, just copy-pasted the license header from an existing Go source file and changed the commenting syntax.

(BTW, I mentioned this in the relevant (but internal to Google) b/165621580.)

@willnorris
Copy link
Collaborator

Hey @ssbr, now that .travis.yml no longer exists, but there are now a handful of new YAML files, you wanna run this again against the current master branch?

From https://opensource.google/docs/releasing/preparing/ :

> BEST PRACTICE: Add license headers to any files that can be added to (i.e. anything that takes the format of a source file and supports file comments). This would include things like YAML files.

I believe this very directly applies to `.travis.yml`, and reasonably also applies to `Dockerfile`. Wasn't sure what year to put, just copy-pasted the license header from an existing Go source file and changed the commenting syntax.

(BTW, I mentioned this in the relevant (but internal to Google) b/165621580.)
@ssbr
Copy link
Author
ssbr commented Aug 10, 2021

I think that's done now. Any other files you have in mind?


It's been a while so I didn't remember how to run addlicense and had some trouble there. :) Apparently, one must run go get addlicense in a different directory than the git repo you're changing, and then cd into the git repo. If you don't, it updates the go.mod and go.sum files for some reason. (I am sure Go experts are rolling their eyes right now.)

@willnorris
7E7E
Copy link
Collaborator

I guess if you really wanna cover everything, then the .github/workflow/** files also?

It seems a little much to have license headers in some of these files, but to your point that is Google's open source guidance. I believe Google will begin accepting SPDX style headers reasonably soon, so that will reduce these down to just two lines.

btw, you can also just run it as:

go run . -ignore "testdata/**" .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0