Skip to content
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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

rabbitprincess
Copy link
Contributor

Overview

fix / cleanup makefile and correcting several commands.
Related to #2319 #2316

@rabbitprincess rabbitprincess marked this pull request as ready for review February 12, 2025 01:57
Copy link
Member

@Roasbeef Roasbeef left a 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
Copy link
Member

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
Copy link
Member

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)
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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/*")
Copy link
Member

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{
{
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants