-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat: fix ci / makefile #2320
base: master
Are you sure you want to change the base?
feat: fix ci / makefile #2320
Conversation
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.
Thanks for this PR!
Changes look good for the most part. Main comment pertains to keeping the grandfathered linter commit
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Check out source | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 |
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.
👍
|
||
LINT_COMMIT := v1.18.0 | ||
GOACC_COMMIT := 80342ae2e0fcf265e99e76bcc4efd022c7c3811b |
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.
So this is important, as it absolves any linter violations before that commit. Otherwise, we'll have to have a PR which fixes every linter violation.
In lnd
, we use golangci
which still supports this feature: https://github.com/lightningnetwork/lnd/pull/9382/files
@@ -1,17 +0,0 @@ | |||
#!/bin/bash | |||
|
|||
SUBMODULES=$(find . -mindepth 2 -name "go.mod" | cut -d'/' -f2) |
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.
Why remove? Given that it's able to locate sub-modules automatically?
In the new diff, we need to enumerate them all by hand.
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 just thought it was simple approach. Other commands, such as unit / unit-cover, are still done entirely by hand. It works perfectly as long as nested go.mod is not added.
Makefile
Outdated
|
||
LINT = $(LINT_BIN) run -v $(LINT_WORKERS) | ||
LINT = $(LINT_BIN) run -v $(LINT_WORKERS) --timeout=$(LINT_TIMEOUT) --issues-exit-code=0 |
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.
Why's issues-exit-code
needed now?
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.
It just exits with code 0 when a lint error occurs. It's not needed, so better to remove it.
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.
resolved in bdf7318
@@ -14,8 +14,6 @@ GOTEST_DEV = go test -v -tags=$(DEV_TAGS) | |||
GOTEST := go test -v | |||
GOMODTIDY := go mod tidy | |||
|
|||
GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*") |
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.
👍 it's been years since we vendor'd deps
@@ -146,7 +146,7 @@ func TestClientConnectedToWSServerRunner(t *testing.T) { | |||
} | |||
|
|||
testTable := []TestTableItem{ | |||
TestTableItem{ | |||
{ |
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.
Were these the only instances in violation? If so then, perhaps we don't need that lint commit hash after all.
Was pretty sure we had some PRs merged in recent times that did things like violate the 80 char column limit.
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 do not know about commit history, but it is only change about make fmt
.
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.
Not make lint
- As far as I know, Go lint only gives warnings and doesn't change the code automatically.
Overview
fix / cleanup makefile and correcting several commands.
Related to #2319 #2316