diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 68cfb30e7..7719f8bfc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -156,9 +156,6 @@ jobs: # lint code ######################## lint: - # Temporarily disabling the linter while this issue persists: - # https://github.com/golangci/golangci-lint/discussions/1920 - if: false name: lint runs-on: ubuntu-latest steps: diff --git a/accounts/service_test.go b/accounts/service_test.go index f1cf120d8..6a7c736bb 100644 --- a/accounts/service_test.go +++ b/accounts/service_test.go @@ -65,16 +65,6 @@ func (m *mockLnd) assertNoMainErr(t *testing.T) { } } -func (m *mockLnd) assertMainErr(t *testing.T, expectedErr error) { - select { - case err := <-m.mainErrChan: - require.Equal(t, expectedErr, err) - - case <-time.After(testTimeout): - t.Fatalf("Did not get expected main err before timeout") - } -} - // assertMainErrContains asserts that the main error contains the expected error // string. func (m *mockLnd) assertMainErrContains(t *testing.T, expectedStr string) { @@ -408,7 +398,6 @@ func TestAccountService(t *testing.T) { lnd.assertMainErrContains( t, "not mapped to any account", ) - }, }, { name: "err in payment update chan", diff --git a/cmd/litcli/accounts.go b/cmd/litcli/accounts.go index 1165256f1..52b01959f 100644 --- a/cmd/litcli/accounts.go +++ b/cmd/litcli/accounts.go @@ -40,19 +40,17 @@ var createAccountCommand = cli.Command{ ShortName: "c", Usage: "Create a new off-chain account with a balance.", ArgsUsage: "balance [expiration_date] [--label=LABEL] [--save_to=FILE]", - Description: "Adds an entry to the account database. " + - "This entry represents an amount of satoshis (account " + - "balance) that can be spent using off-chain transactions " + - "(e.g. paying invoices).\n\n" + - - " Macaroons can be created to be locked to an account. " + - "This makes sure that the bearer of the macaroon can only " + - "spend at most that amount of satoshis through the daemon " + - "that has issued the macaroon.\n\n" + - - " Accounts only assert a maximum amount spendable. Having " + - "a certain account balance does not guarantee that the node " + - "has the channel liquidity to actually spend that amount.", + Description: `Adds an entry to the account database. +This entry represents an amount of satoshis (account balance) that can be spent +using off-chain transactions (e.g. paying invoices). + +Macaroons can be created to be locked to an account. This makes sure that the +bearer of the macaroon can only spend at most that amount of satoshis through +the daemon that has issued the macaroon. + +Accounts only assert a maximum amount spendable. Having a certain account +balance does not guarantee that the node has the channel liquidity to actually +spend that amount.`, Flags: []cli.Flag{ cli.Uint64Flag{ Name: "balance", @@ -315,10 +313,10 @@ func accountInfo(ctx *cli.Context) error { } var removeAccountCommand = cli.Command{ - Name: "remove", - ShortName: "r", - Usage: "Remove an off-chain account from the database.", - ArgsUsage: "[id | label]", + Name: "remove", + ShortName: "r", + Usage: "Remove an off-chain account from the database.", + ArgsUsage: "[id | label]", Description: "Removes an account entry from the account database.", Flags: []cli.Flag{ cli.StringFlag{ diff --git a/cmd/litcli/actions.go b/cmd/litcli/actions.go index e752c561d..8e757acd5 100644 --- a/cmd/litcli/actions.go +++ b/cmd/litcli/actions.go @@ -10,10 +10,10 @@ import ( ) var listActionsCommand = cli.Command{ - Name: "actions", - Usage: "List actions performed on the Litd server", + Name: "actions", + Usage: "List actions performed on the Litd server", Category: "Firewall", - Action: listActions, + Action: listActions, Flags: []cli.Flag{ cli.StringFlag{ Name: "feature", diff --git a/cmd/litcli/autopilot.go b/cmd/litcli/autopilot.go index 9b8c3f07f..bbb309134 100644 --- a/cmd/litcli/autopilot.go +++ b/cmd/litcli/autopilot.go @@ -28,11 +28,11 @@ var autopilotCommands = cli.Command{ } var listAutopilotFeaturesCmd = cli.Command{ - Name: "features", - ShortName: "f", - Usage: "List available Autopilot features.", + Name: "features", + ShortName: "f", + Usage: "List available Autopilot features.", Description: "List available Autopilot features.", - Action: listFeatures, + Action: listFeatures, } var addAutopilotSessionCmd = cli.Command{ @@ -85,11 +85,11 @@ var addAutopilotSessionCmd = cli.Command{ } var revokeAutopilotSessionCmd = cli.Command{ - Name: "revoke", - ShortName: "r", - Usage: "Revoke an Autopilot session.", + Name: "revoke", + ShortName: "r", + Usage: "Revoke an Autopilot session.", Description: "Revoke an active Autopilot session.", - Action: revokeAutopilotSession, + Action: revokeAutopilotSession, Flags: []cli.Flag{ cli.StringFlag{ Name: "localpubkey", @@ -101,11 +101,11 @@ var revokeAutopilotSessionCmd = cli.Command{ } var listAutopilotSessionsCmd = cli.Command{ - Name: "list", - ShortName: "l", - Usage: "List all Autopilot sessions.", + Name: "list", + ShortName: "l", + Usage: "List all Autopilot sessions.", Description: "List all Autopilot sessions.\n", - Action: listAutopilotSessions, + Action: listAutopilotSessions, } func revokeAutopilotSession(ctx *cli.Context) error { diff --git a/cmd/litcli/helpers.go b/cmd/litcli/helpers.go index d2f4d6fe6..1d3170ead 100644 --- a/cmd/litcli/helpers.go +++ b/cmd/litcli/helpers.go @@ -17,7 +17,7 @@ var helperCommands = cli.Command{ Name: "helper", Usage: "Helper commands", Description: "Helper commands.", - Category: "LiT", + Category: "LiT", Subcommands: []cli.Command{ generateSuperMacRootIDCmd, isSuperMacaroonCmd, diff --git a/cmd/litcli/sessions.go b/cmd/litcli/sessions.go index 16cbdeb85..c3a7d896e 100644 --- a/cmd/litcli/sessions.go +++ b/cmd/litcli/sessions.go @@ -17,8 +17,8 @@ var ( defaultSessionExpiry = time.Hour * 24 * 90 labelFlag = cli.StringFlag{ - Name: "label", - Usage: "The session label.", + Name: "label", + Usage: "The session label.", Required: true, } expiryFlag = cli.Uint64Flag{ diff --git a/cmd/litcli/status.go b/cmd/litcli/status.go index f4ea4a66c..6100866d3 100644 --- a/cmd/litcli/status.go +++ b/cmd/litcli/status.go @@ -14,7 +14,7 @@ var statusCommands = []cli.Command{ Usage: "View info about litd status", Description: "View info about litd status.\n", Category: "LiT", - Action: getStatus, + Action: getStatus, }, }