Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

makefile add license check support #44

Closed
wants to merge 4 commits into from

Conversation

wph95
Copy link
Member

@wph95 wph95 commented Mar 3, 2021

resolved #39

Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run make ci-check, I get some errors on generated files:

make ci-check
GOOS=darwin /Library/Developer/CommandLineTools/usr/bin/make for-all CMD="go vet ./..."
GOOS=linux /Library/Developer/CommandLineTools/usr/bin/make for-all CMD="go vet ./..."
GOOS=windows /Library/Developer/CommandLineTools/usr/bin/make for-all CMD="go vet ./..."
golangci-lint run ./...
addlicense FAILED => add License errors:

./testutil/operator_builder.go
./testutil/pipeline.go
./testutil/database.go
./testutil/operator.go

Use 'make add-license' to fix this.
make: *** [check-license] Error 1

@tigrannajaryan Is it an acceptable approach to exclude these files from the license check?

@wph95
Copy link
Member Author

wph95 commented Mar 3, 2021

if want ignore testutil/*
just change makefile ALL_SRC like https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/Makefile.Common#L5

@djaglowski
Copy link
Member

I think that this PR should include making all the license checks pass, so we should include the change here. Do you mind adding?

Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to figure out how to make use of the tooling packages without including them in the module file.

Comment on lines +8 to +9
github.com/golangci/golangci-lint v1.37.1 // indirect
github.com/google/addlicense v0.0.0-20200906110928-a0294312aa76 // indirect
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to include these in the module, and believe we should try not to.

Neither the collector or collector-contrib repos have needed these in go.mod.

@@ -1,144 +1,666 @@
4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a h1:wFEQiK85fRsEVF0CRrPAos5LoAryUsIX1kPW/WrIqFw=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a lot of extras that I can't reconcile. Can you try regenerating this after addressing the go.mod comment?

@tigrannajaryan
Copy link
Member

When I run make ci-check, I get some errors on generated files:

make ci-check
GOOS=darwin /Library/Developer/CommandLineTools/usr/bin/make for-all CMD="go vet ./..."
GOOS=linux /Library/Developer/CommandLineTools/usr/bin/make for-all CMD="go vet ./..."
GOOS=windows /Library/Developer/CommandLineTools/usr/bin/make for-all CMD="go vet ./..."
golangci-lint run ./...
addlicense FAILED => add License errors:

./testutil/operator_builder.go
./testutil/pipeline.go
./testutil/database.go
./testutil/operator.go

Use 'make add-license' to fix this.
make: *** [check-license] Error 1

@tigrannajaryan Is it an acceptable approach to exclude these files from the license check?

@djaglowski Yes, we normally exclude generated files from license checks.

@wph95 wph95 closed this Mar 5, 2021
@wph95 wph95 deleted the add-license-check branch March 5, 2021 05:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tooling should validate copyright header is present
3 participants