mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-04-21 11:57:04 +02:00
[chore] Run generate before lint (#4093)
This commit is contained in:
parent
f95bee22b9
commit
c3b48e2c1e
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -37,6 +37,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: ~/.tools
|
path: ~/.tools
|
||||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('./internal/tools/**') }}
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('./internal/tools/**') }}
|
||||||
|
- name: Run go generate
|
||||||
|
run: make generate
|
||||||
- name: Run linters
|
- name: Run linters
|
||||||
run: make dependabot-check license-check lint vanity-import-check
|
run: make dependabot-check license-check lint vanity-import-check
|
||||||
- name: Build
|
- name: Build
|
||||||
|
14
Makefile
14
Makefile
@ -25,8 +25,8 @@ TIMEOUT = 60
|
|||||||
.DEFAULT_GOAL := precommit
|
.DEFAULT_GOAL := precommit
|
||||||
|
|
||||||
.PHONY: precommit ci
|
.PHONY: precommit ci
|
||||||
precommit: dependabot-generate license-check vanity-import-fix misspell go-mod-tidy golangci-lint-fix test-default
|
precommit: generate dependabot-generate license-check vanity-import-fix misspell go-mod-tidy golangci-lint-fix test-default
|
||||||
ci: dependabot-check license-check lint vanity-import-check build test-default check-clean-work-tree test-coverage
|
ci: generate dependabot-check license-check lint vanity-import-check build test-default check-clean-work-tree test-coverage
|
||||||
|
|
||||||
# Tools
|
# Tools
|
||||||
|
|
||||||
@ -74,9 +74,9 @@ $(TOOLS)/gojq: PACKAGE=github.com/itchyny/gojq/cmd/gojq
|
|||||||
.PHONY: tools
|
.PHONY: tools
|
||||||
tools: $(CROSSLINK) $(DBOTCONF) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(GOJQ) $(SEMCONVGEN) $(MULTIMOD) $(SEMCONVKIT)
|
tools: $(CROSSLINK) $(DBOTCONF) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(GOJQ) $(SEMCONVGEN) $(MULTIMOD) $(SEMCONVKIT)
|
||||||
|
|
||||||
# Build
|
# Generate
|
||||||
|
|
||||||
.PHONY: generate build
|
.PHONY: generate
|
||||||
|
|
||||||
generate: $(OTEL_GO_MOD_DIRS:%=generate/%)
|
generate: $(OTEL_GO_MOD_DIRS:%=generate/%)
|
||||||
generate/%: DIR=$*
|
generate/%: DIR=$*
|
||||||
@ -85,7 +85,11 @@ generate/%: | $(STRINGER) $(PORTO)
|
|||||||
&& cd $(DIR) \
|
&& cd $(DIR) \
|
||||||
&& PATH="$(TOOLS):$${PATH}" $(GO) generate ./... && $(PORTO) -w .
|
&& PATH="$(TOOLS):$${PATH}" $(GO) generate ./... && $(PORTO) -w .
|
||||||
|
|
||||||
build: generate $(OTEL_GO_MOD_DIRS:%=build/%) $(OTEL_GO_MOD_DIRS:%=build-tests/%)
|
# Build
|
||||||
|
|
||||||
|
.PHONY: build
|
||||||
|
|
||||||
|
build: $(OTEL_GO_MOD_DIRS:%=build/%) $(OTEL_GO_MOD_DIRS:%=build-tests/%)
|
||||||
build/%: DIR=$*
|
build/%: DIR=$*
|
||||||
build/%:
|
build/%:
|
||||||
@echo "$(GO) build $(DIR)/..." \
|
@echo "$(GO) build $(DIR)/..." \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user