You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ha...@apache.org on 2022/06/29 02:09:56 UTC
[skywalking-banyandb] branch toolchain-lint created (now 9772db7)
This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a change to branch toolchain-lint
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
at 9772db7 Install golangci-lint by go install
This branch includes the following new commits:
new 9772db7 Install golangci-lint by go install
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[skywalking-banyandb] 01/01: Install golangci-lint by go install
Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a commit to branch toolchain-lint
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
commit 9772db788d74484c32eb4c8db9bbf4d5048e43af
Author: Gao Hongtao <ha...@gmail.com>
AuthorDate: Wed Jun 29 02:05:06 2022 +0000
Install golangci-lint by go install
Signed-off-by: Gao Hongtao <ha...@gmail.com>
---
scripts/build/base.mk | 4 ++++
scripts/build/lint-api.mk | 6 ------
scripts/build/lint-deprecated.mk | 6 ------
scripts/build/lint.mk | 8 --------
4 files changed, 4 insertions(+), 20 deletions(-)
diff --git a/scripts/build/base.mk b/scripts/build/base.mk
index 3f3c7cd..05b1d06 100644
--- a/scripts/build/base.mk
+++ b/scripts/build/base.mk
@@ -37,6 +37,10 @@ endif
GO_LINK_VERSION := -X ${VERSION_PATH}.build=${VERSION_STRING}-${GIT_BRANCH_NAME}
+LINTER := $(tool_bin)/golangci-lint
+$(LINTER):
+ @GOBIN=$(tool_bin) go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2
+
.PHONY: clean
clean:
git clean -Xdf
diff --git a/scripts/build/lint-api.mk b/scripts/build/lint-api.mk
index a2e40c2..f9bc980 100644
--- a/scripts/build/lint-api.mk
+++ b/scripts/build/lint-api.mk
@@ -16,16 +16,10 @@
# under the License.
#
-GOLANGCI_VERSION := v1.46.2
-
LINT_OPTS ?= --timeout 1m0s
##@ Code quality targets
-LINTER := $(tool_bin)/golangci-lint
-$(LINTER):
- @wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(root_dir)/bin $(GOLANGCI_VERSION)
-
.PHONY: lint
lint: $(LINTER)
@PATH=$(tool_bin):$(proto_dir) $(BUF) lint
diff --git a/scripts/build/lint-deprecated.mk b/scripts/build/lint-deprecated.mk
index 6c9d90e..c73f7dc 100644
--- a/scripts/build/lint-deprecated.mk
+++ b/scripts/build/lint-deprecated.mk
@@ -16,16 +16,10 @@
# under the License.
#
-GOLANGCI_VERSION := v1.46.2
-
LINT_OPTS ?= --timeout 1m0s
##@ Code quality targets
-LINTER := $(tool_bin)/golangci-lint
-$(LINTER):
- @wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(root_dir)/bin $(GOLANGCI_VERSION)
-
.PHONY: lint
lint: $(LINTER)
$(LINTER) --verbose run $(LINT_OPTS) --config $(root_dir)/deprecated-golangci.yml
diff --git a/scripts/build/lint.mk b/scripts/build/lint.mk
index e52df5a..67f230a 100644
--- a/scripts/build/lint.mk
+++ b/scripts/build/lint.mk
@@ -16,16 +16,8 @@
# under the License.
#
-GOLANGCI_VERSION := v1.46.2
-
-LINT_OPTS ?= --timeout 1m0s
-
##@ Code quality targets
-LINTER := $(tool_bin)/golangci-lint
-$(LINTER):
- @wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(root_dir)/bin $(GOLANGCI_VERSION)
-
REVIVE := $(tool_bin)/revive
$(REVIVE):
@GOBIN=$(tool_bin) go install github.com/mgechev/revive@latest