To ensure we don’t create source files without the appropriate copyright messages.
GCP has a go test which might be helpful here
https://github.com/GoogleCloudPlatform/golang-samples/blob/master/license_test.go
I have been unable to find a Github feature that can be leveraged for this task. So I've worked with the above sample from GCP.
I've made some updates to the above licence_test file, to allow filtering out of any go files within the generated directories as they are always flagging as missing copyright.
The is picking up a couple of error files, but does trigger on files where the top line is not the copyright statement. Typically this is files where the first line is // +build.
This could be build into a standalone binary and run from a docker container or as a serverless function.
If this is a path you want to look at further, I would need assistance from those more experienced with Go.
Thanks for working on this. Please note that the issue is on the backlog,
its not on the critical path for 1.1. I suggest leaving this
investigation where it is.
On Tue, 19 Nov 2019 at 12:34, SDBrett notifications@github.com wrote:
I have been unable to find a Github feature that can be leveraged for this
task. So I've worked with the above sample from GCP.I've made some updates to the above licence_test file, to allow filtering
out of any go files within the generated directories as they are always
flagging as missing copyright.The is picking up a couple of error files, but does trigger on files where
the top line is not the copyright statement. Typically this is files where
the first line is // +build.This could be build into a standalone binary and run from a docker
container or as a serverless function.If this is a path you want to look at further, I would need assistance
from those more experienced with Go.—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/projectcontour/contour/issues/1917?email_source=notifications&email_token=AAABYA7VEME7LWOROTUPF5LQUM7BNA5CNFSM4JO26EA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEMQ6ZY#issuecomment-555290471,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAABYAZWGG3OJ2RCURPAHIDQUM7BNANCNFSM4JO26EAQ
.
We should be able to enable go-header in the golanglint-ci task to do this.
Most helpful comment
We should be able to enable go-header in the golanglint-ci task to do this.