-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Run crosslink before checking for clean work tree #2623
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 |
---|---|---|
|
@@ -38,7 +38,7 @@ jobs: | |
path: ~/.tools | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('./internal/tools/**') }} | ||
- name: Run linters | ||
run: make dependabot-check license-check lint vanity-import-check | ||
run: make dependabot-check license-check lint vanity-import-check crosslink | ||
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.
|
||
- name: Build | ||
run: make build | ||
- name: Check clean repository | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,7 +79,7 @@ generate/%: | $(STRINGER) $(PORTO) | |
&& cd $(DIR) \ | ||
&& PATH="$(TOOLS):$${PATH}" $(GO) generate ./... && $(PORTO) -w . | ||
|
||
build: generate $(OTEL_GO_MOD_DIRS:%=build/%) $(OTEL_GO_MOD_DIRS:%=build-tests/%) | ||
build: crosslink generate $(OTEL_GO_MOD_DIRS:%=build/%) $(OTEL_GO_MOD_DIRS:%=build-tests/%) | ||
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. Separating the build from module linting is the current design of this Makefile. These targets are joined together in the |
||
build/%: DIR=$* | ||
build/%: | ||
@echo "$(GO) build $(DIR)/..." \ | ||
|
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.
I get why this might be added here, but I want to point out that crosslink makes changes to files unlike all the other linters here. So if it does make a change, the error will be in the Check clean repository step. Which can make debugging this more difficult.
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.
My first commit added that as its own step. Though that seemed a bit overkill, I'm happy to bring it back.