-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Implement check and add headers in mage #13215
Conversation
@@ -0,0 +1,255 @@ | |||
// Licensed to Elasticsearch B.V. under one or more contributor |
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.
This file is verbatim copied from https://github.com/elastic/go-txfile/tree/master/dev-tools/lib/mage/gotool
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.
At the end I changed it so same flag can be specified multiple times, what was needed for go-licenser
when multiple -exclude
s are needed.
jenkins, test this again please |
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.
Would you consider integrating this into the dev-tools/mage/target/common's Check()
and Fmt()
too?
And instead of adding AddLicenseHeaders
and CheckLicenseHeaders
to each project you could update all the projects to have a mage import like
import (
...
// mage:import
_ "github.com/elastic/beats/dev-tools/mage/target/common"
)
I will continue with this after #13239 |
@andrewkroh @urso this would be ready for another look |
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
Add a framework to wrap go tooling in mage, taken from go-txtfile.
Using it, reimplements all uses of go-licenser in mage.
go-licenser is vendored.
Replaces #13211, see comments there for more context.