-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
lint: run goheader enforcing standardized Go header template #21821
Conversation
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.
😲
1cb6383
to
ae6ebfd
Compare
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.
Based on the discussions on my prior feedback, I don't think any changes to the content are necessary. It'd be nice to update the commit messages to highlight the background to the changes but otherwise this LGTM. Thanks for this, it's caught a bunch of missing licenses in source files 🎉
ca451eb removed the use of SHT_REL(A), making this unnecessary. Signed-off-by: Timo Beckers <timo@isovalent.com>
These files were mostly taken from the Go stdlib. It seems like the Go project has also moved to a lean file header pointing to a single LICENSE file in the project. Retain only the relevant Go Authors copyright notice and point to the original files. Signed-off-by: Timo Beckers <timo@isovalent.com>
Signed-off-by: Timo Beckers <timo@isovalent.com>
Since we didn't have a linter to enforce a particular Go file header format, this patch adds one with a relatively simple structure. goheader can only match on a single block of // statements, so anything that cannot be encoded in the template needed to be moved to a separate block. For Hubble packages, 'Authors of Hubble' was kept as the primary tagline. Any other copyright notices were moved to subsequent blocks. Signed-off-by: Timo Beckers <timo@isovalent.com>
ae6ebfd
to
9180fc6
Compare
Hit some unrelated unit test flake in Travis, marking ready. |
Since we didn't have a linter to enforce a particular Go file header format, this patch adds one with a relatively simple structure.
goheader can only match on a single block of // statements, so anything that cannot be encoded in the template needed to be moved to a separate block.
For Hubble packages, 'Authors of Hubble' was kept as the primary tagline. Any other copyright notices were moved to subsequent blocks.
Fixes: #20769 (comment)