From 99ebb6797249234ecbe6978355a4a2202fb752fb Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Thu, 5 Jan 2023 08:49:17 +0100 Subject: [PATCH 1/3] lint: disable thelper linter --- .golangci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index be2b63897..2ab612f58 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -179,6 +179,11 @@ linters: # Disable nil check to allow returning multiple nil values. - nilnil + + # We often split tests into separate test functions. If we are forced to + # call t.Helper() within those functions, we lose the information where + # exactly a test failed in the generated failure stack trace. + - thelper issues: From 04dc37e4637bcfa219ed95e473f31872d77db0ee Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Thu, 5 Jan 2023 08:49:31 +0100 Subject: [PATCH 2/3] lnwire: remove nolint comment --- lnwire/onion_error_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnwire/onion_error_test.go b/lnwire/onion_error_test.go index 96a088065..9746cf076 100644 --- a/lnwire/onion_error_test.go +++ b/lnwire/onion_error_test.go @@ -101,7 +101,7 @@ func TestEncodeDecodeTlv(t *testing.T) { var testTlv, _ = hex.DecodeString("fd023104deadbeef") -func testEncodeDecodeTlv(t *testing.T, testFailure FailureMessage) { //nolint: lll,thelper +func testEncodeDecodeTlv(t *testing.T, testFailure FailureMessage) { var failureMessageBuffer bytes.Buffer err := EncodeFailureMessage(&failureMessageBuffer, testFailure, 0) From 6585d5997a84da166fa8793bb583ea4655cda768 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Thu, 5 Jan 2023 08:52:01 +0100 Subject: [PATCH 3/3] docs: add release notes --- docs/release-notes/release-notes-0.16.0.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/release-notes-0.16.0.md b/docs/release-notes/release-notes-0.16.0.md index 49e51052c..b3713c657 100644 --- a/docs/release-notes/release-notes-0.16.0.md +++ b/docs/release-notes/release-notes-0.16.0.md @@ -301,7 +301,9 @@ certain large transactions](https://github.com/lightningnetwork/lnd/pull/7100). adding a data migration functionality to `lndinit`. * [`golangci-lint` will now check new code using additional - linters.](https://github.com/lightningnetwork/lnd/pull/7064) + linters](https://github.com/lightningnetwork/lnd/pull/7064) and was + [fine-tuned](https://github.com/lightningnetwork/lnd/pull/7289) to fit our + code style. * Update github actions to [check commits against the target base branch](https://github.com/lightningnetwork/lnd/pull/7103) rather than just