Skip to content

Commit c757746

Browse files
authored
Merge pull request #699 from lightninglabs/linter-fixes
linter: re-enable the linter
2 parents b661875 + bca54ef commit c757746

File tree

8 files changed

+34
-50
lines changed

8 files changed

+34
-50
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,6 @@ jobs:
156156
# lint code
157157
########################
158158
lint:
159-
# Temporarily disabling the linter while this issue persists:
160-
# https://github.com/golangci/golangci-lint/discussions/1920
161-
if: false
162159
name: lint
163160
runs-on: ubuntu-latest
164161
steps:

accounts/service_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,6 @@ func (m *mockLnd) assertNoMainErr(t *testing.T) {
6565
}
6666
}
6767

68-
func (m *mockLnd) assertMainErr(t *testing.T, expectedErr error) {
69-
select {
70-
case err := <-m.mainErrChan:
71-
require.Equal(t, expectedErr, err)
72-
73-
case <-time.After(testTimeout):
74-
t.Fatalf("Did not get expected main err before timeout")
75-
}
76-
}
77-
7868
// assertMainErrContains asserts that the main error contains the expected error
7969
// string.
8070
func (m *mockLnd) assertMainErrContains(t *testing.T, expectedStr string) {
@@ -408,7 +398,6 @@ func TestAccountService(t *testing.T) {
408398
lnd.assertMainErrContains(
409399
t, "not mapped to any account",
410400
)
411-
412401
},
413402
}, {
414403
name: "err in payment update chan",

cmd/litcli/accounts.go

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,17 @@ var createAccountCommand = cli.Command{
4040
ShortName: "c",
4141
Usage: "Create a new off-chain account with a balance.",
4242
ArgsUsage: "balance [expiration_date] [--label=LABEL] [--save_to=FILE]",
43-
Description: "Adds an entry to the account database. " +
44-
"This entry represents an amount of satoshis (account " +
45-
"balance) that can be spent using off-chain transactions " +
46-
"(e.g. paying invoices).\n\n" +
47-
48-
" Macaroons can be created to be locked to an account. " +
49-
"This makes sure that the bearer of the macaroon can only " +
50-
"spend at most that amount of satoshis through the daemon " +
51-
"that has issued the macaroon.\n\n" +
52-
53-
" Accounts only assert a maximum amount spendable. Having " +
54-
"a certain account balance does not guarantee that the node " +
55-
"has the channel liquidity to actually spend that amount.",
43+
Description: `Adds an entry to the account database.
44+
This entry represents an amount of satoshis (account balance) that can be spent
45+
using off-chain transactions (e.g. paying invoices).
46+
47+
Macaroons can be created to be locked to an account. This makes sure that the
48+
bearer of the macaroon can only spend at most that amount of satoshis through
49+
the daemon that has issued the macaroon.
50+
51+
Accounts only assert a maximum amount spendable. Having a certain account
52+
balance does not guarantee that the node has the channel liquidity to actually
53+
spend that amount.`,
5654
Flags: []cli.Flag{
5755
cli.Uint64Flag{
5856
Name: "balance",
@@ -315,10 +313,10 @@ func accountInfo(ctx *cli.Context) error {
315313
}
316314

317315
var removeAccountCommand = cli.Command{
318-
Name: "remove",
319-
ShortName: "r",
320-
Usage: "Remove an off-chain account from the database.",
321-
ArgsUsage: "[id | label]",
316+
Name: "remove",
317+
ShortName: "r",
318+
Usage: "Remove an off-chain account from the database.",
319+
ArgsUsage: "[id | label]",
322320
Description: "Removes an account entry from the account database.",
323321
Flags: []cli.Flag{
324322
cli.StringFlag{

cmd/litcli/actions.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import (
1010
)
1111

1212
var listActionsCommand = cli.Command{
13-
Name: "actions",
14-
Usage: "List actions performed on the Litd server",
13+
Name: "actions",
14+
Usage: "List actions performed on the Litd server",
1515
Category: "Firewall",
16-
Action: listActions,
16+
Action: listActions,
1717
Flags: []cli.Flag{
1818
cli.StringFlag{
1919
Name: "feature",

cmd/litcli/autopilot.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ var autopilotCommands = cli.Command{
2828
}
2929

3030
var listAutopilotFeaturesCmd = cli.Command{
31-
Name: "features",
32-
ShortName: "f",
33-
Usage: "List available Autopilot features.",
31+
Name: "features",
32+
ShortName: "f",
33+
Usage: "List available Autopilot features.",
3434
Description: "List available Autopilot features.",
35-
Action: listFeatures,
35+
Action: listFeatures,
3636
}
3737

3838
var addAutopilotSessionCmd = cli.Command{
@@ -85,11 +85,11 @@ var addAutopilotSessionCmd = cli.Command{
8585
}
8686

8787
var revokeAutopilotSessionCmd = cli.Command{
88-
Name: "revoke",
89-
ShortName: "r",
90-
Usage: "Revoke an Autopilot session.",
88+
Name: "revoke",
89+
ShortName: "r",
90+
Usage: "Revoke an Autopilot session.",
9191
Description: "Revoke an active Autopilot session.",
92-
Action: revokeAutopilotSession,
92+
Action: revokeAutopilotSession,
9393
Flags: []cli.Flag{
9494
cli.StringFlag{
9595
Name: "localpubkey",
@@ -101,11 +101,11 @@ var revokeAutopilotSessionCmd = cli.Command{
101101
}
102102

103103
var listAutopilotSessionsCmd = cli.Command{
104-
Name: "list",
105-
ShortName: "l",
106-
Usage: "List all Autopilot sessions.",
104+
Name: "list",
105+
ShortName: "l",
106+
Usage: "List all Autopilot sessions.",
107107
Description: "List all Autopilot sessions.\n",
108-
Action: listAutopilotSessions,
108+
Action: listAutopilotSessions,
109109
}
110110

111111
func revokeAutopilotSession(ctx *cli.Context) error {

cmd/litcli/helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var helperCommands = cli.Command{
1717
Name: "helper",
1818
Usage: "Helper commands",
1919
Description: "Helper commands.",
20-
Category: "LiT",
20+
Category: "LiT",
2121
Subcommands: []cli.Command{
2222
generateSuperMacRootIDCmd,
2323
isSuperMacaroonCmd,

cmd/litcli/sessions.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ var (
1717
defaultSessionExpiry = time.Hour * 24 * 90
1818

1919
labelFlag = cli.StringFlag{
20-
Name: "label",
21-
Usage: "The session label.",
20+
Name: "label",
21+
Usage: "The session label.",
2222
Required: true,
2323
}
2424
expiryFlag = cli.Uint64Flag{

cmd/litcli/status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var statusCommands = []cli.Command{
1414
Usage: "View info about litd status",
1515
Description: "View info about litd status.\n",
1616
Category: "LiT",
17-
Action: getStatus,
17+
Action: getStatus,
1818
},
1919
}
2020

0 commit comments

Comments
 (0)