-
Notifications
You must be signed in to change notification settings - Fork 0
Bump add addlicense check in Makefile #96
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -37,7 +37,8 @@ GOLANGCILINTER_BINARY=$(TOOLS_BIN_DIR)/golangci-lint | |||||
| GOSEC_BINARY=$(TOOLS_BIN_DIR)/gosec | ||||||
| GOSYCLO_BINARY=$(TOOLS_BIN_DIR)/gocyclo | ||||||
| SWAGGO_BINARY=$(TOOLS_BIN_DIR)/swag | ||||||
| TOOLING=$(GOLANGCILINTER_BINARY) $(GOSEC_BINARY) $(GOSYCLO_BINARY) $(SWAGGO_BINARY) | ||||||
| ADDLICENSE_BINARY=$(TOOLS_BIN_DIR)/addlicense | ||||||
| TOOLING=$(GOLANGCILINTER_BINARY) $(GOSEC_BINARY) $(GOSYCLO_BINARY) $(SWAGGO_BINARY) $(ADDLICENSE_BINARY) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||||||
|
|
||||||
| GO_PKG=github.com/kubeservice-stack/$(SERVER_NAME) | ||||||
| COMMON_PKG ?= $(GO_PKG)/pkg | ||||||
|
|
@@ -62,7 +63,7 @@ GO_BUILD_RECIPE=\ | |||||
| pkgs = $(shell go list ./... | grep -v /test/ | grep -v /vendor/) | ||||||
|
|
||||||
| .PHONY: all | ||||||
| all: swag format test build e2e # format test build e2e type. | ||||||
| all: swag addlicense format test build e2e # format test build e2e type. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 应在all目标中调用addlicense任务以执行许可证检查。
📋 问题详情当前 💡 解决方案在 - all: swag format test build e2e # format test build e2e type.
+ all: swag addlicense format test build e2e # format test build e2e type.🔧 建议代码
Suggested change
|
||||||
|
|
||||||
| .PHONY: clean | ||||||
| clean: # Remove all files and directories ignored by git. | ||||||
|
|
@@ -97,6 +98,9 @@ golangci-lint: $(GOLANGCILINTER_BINARY) # golangci-lint | |||||
| swag: $(SWAGGO_BINARY) # swag | ||||||
| $(SWAGGO_BINARY) init -g ./cmd/main.go | ||||||
|
|
||||||
| .PHONY: addlicense | ||||||
| addlicense: $(ADDLICENSE_BINARY) # addlicense | ||||||
| $(ADDLICENSE_BINARY) -f scripts/boilerplate.txt -ignore "{vendor/**,docs/**}" **/*.go | ||||||
| ########### | ||||||
| # Testing # | ||||||
| ########### | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| Copyright 2024 The KubeService-Stack Authors. | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. |
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.
应更新工具变量以包含新添加的addlicense二进制文件。
📋 问题详情
在Makefile中,
TOOLING变量未包含新增的ADDLICENSE_BINARY,这可能导致依赖管理不完整或构建过程中遗漏该工具。为确保所有工具都被正确引用和使用,应当将ADDLICENSE_BINARY加入到TOOLING变量中。💡 解决方案
将
ADDLICENSE_BINARY添加到TOOLING变量中以确保它被包含在内。有用意见👍 | 无用意见👎 | 错误意见❌