Skip to content

Commit a0e6312

Browse files
committed
multi: reformat long lines for readability
- Replace occurrences of `// nolint:lll` with `// nolint:ll` across files for consistency. - Reformat multiline strings, comments, and function parameters to improve clarity and adhere to style guidelines. - Add `// nolint:ll` comments where necessary to prevent linter warnings.
1 parent e96424c commit a0e6312

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+383
-216
lines changed

accounts/checkers.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ func NewAccountChecker(service Service,
110110
)
111111
}
112112

113+
// nolint:ll
113114
checkers := CheckerMap{
114115
// Invoices:
115116
"/lnrpc.Lightning/AddInvoice": mid.NewResponseRewriter(

accounts/checkers_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ func TestAccountCheckers(t *testing.T) {
379379
originalRequest: &lnrpc.PendingChannelsRequest{},
380380
originalResponse: &lnrpc.PendingChannelsResponse{
381381
TotalLimboBalance: 123456,
382+
// nolint:ll
382383
PendingOpenChannels: []*lnrpc.PendingChannelsResponse_PendingOpenChannel{
383384
{},
384385
},

accounts/store_sql.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const (
3131
// SQLQueries is a subset of the sqlc.Queries interface that can be used
3232
// to interact with accounts related tables.
3333
//
34-
//nolint:lll
34+
//nolint:ll
3535
type SQLQueries interface {
3636
AddAccountInvoice(ctx context.Context, arg sqlc.AddAccountInvoiceParams) error
3737
DeleteAccount(ctx context.Context, id int64) error

accounts/tlv.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,9 @@ func PaymentEntryMapEncoder(w io.Writer, val any, buf *[8]byte) error {
227227
}
228228

229229
// PaymentEntryMapDecoder decodes a map of payment entries.
230-
func PaymentEntryMapDecoder(r io.Reader, val any, buf *[8]byte, _ uint64) error {
230+
func PaymentEntryMapDecoder(r io.Reader, val any, buf *[8]byte,
231+
_ uint64) error {
232+
231233
if typ, ok := val.(*AccountPayments); ok {
232234
numItems, err := tlv.ReadVarInt(r, buf)
233235
if err != nil {

autopilotserver/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var ErrVersionIncompatible = fmt.Errorf("litd version is not compatible " +
2727

2828
// Config holds the configuration options for the autopilot server client.
2929
//
30-
//nolint:lll
30+
//nolint:ll
3131
type Config struct {
3232
// Disable will disable the autopilot client.
3333
Disable bool `long:"disable" description:"disable the autopilot client"`

autopilotserver/mock/server.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ func (m *Server) GetPrivacyFlags(remoteKey *btcec.PublicKey) (
310310
key := hex.EncodeToString(remoteKey.SerializeCompressed())
311311
sess, ok := m.sessions[key]
312312
if !ok {
313-
return session.PrivacyFlags{}, fmt.Errorf("no such client found")
313+
return session.PrivacyFlags{},
314+
fmt.Errorf("no such client found")
314315
}
315316

316317
privacyFlags, err := session.Deserialize(sess.privacyFlags)
@@ -436,7 +437,9 @@ func rulesToRPC(rulesMap map[string]*RuleRanges) (
436437
return res, nil
437438
}
438439

439-
func permissionsToRPC(ps map[string][]bakery.Op) []*autopilotserverrpc.Permissions {
440+
func permissionsToRPC(
441+
ps map[string][]bakery.Op) []*autopilotserverrpc.Permissions {
442+
440443
res := make([]*autopilotserverrpc.Permissions, len(ps))
441444

442445
for method, ops := range ps {

cmd/litcli/accounts.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ var updateAccountCommand = cli.Command{
146146
Name: "update",
147147
ShortName: "u",
148148
Usage: "Update an existing off-chain account.",
149-
ArgsUsage: "[id | label] new_balance [new_expiration_date] [--save_to=]",
149+
ArgsUsage: "[id | label] new_balance [new_expiration_date] " +
150+
"[--save_to=]",
150151
Description: "Updates an existing off-chain account and sets " +
151152
"either a new balance or new expiration date or both.",
152153
Flags: []cli.Flag{

cmd/litcli/actions.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ var listActionsCommand = cli.Command{
5353
Name: "state",
5454
Usage: "The action state to filter on. If not set, " +
5555
"then actions of any state will be returned. " +
56-
"Options include: 'pending', 'done' and 'error'.",
56+
"Options include: 'pending', 'done' and " +
57+
"'error'.",
5758
},
5859
cli.Uint64Flag{
5960
Name: "index_offset",

cmd/litcli/autopilot.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ var addAutopilotSessionCmd = cli.Command{
131131
},
132132
cli.StringFlag{
133133
Name: "privacy-flags",
134-
Usage: "String representation of privacy flags to set " +
135-
"for the session. Each individual flag will " +
136-
"remove privacy from certain aspects of " +
137-
"messages transmitted to autopilot. " +
138-
"The strongest privacy is on by " +
134+
Usage: "String representation of privacy flags " +
135+
"to set for the session. Each individual " +
136+
"flag will remove privacy from certain " +
137+
"aspects of messages transmitted to " +
138+
"autopilot. The strongest privacy is on by " +
139139
"default and an empty string means full " +
140140
"privacy. Some features may not be able to " +
141141
"run correctly with full privacy, see the " +

cmd/litcli/proxy.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ var litCommands = []cli.Command{
1717
Name: "bakesupermacaroon",
1818
Usage: "Bake a new super macaroon with all of LiT's active " +
1919
"permissions",
20-
Description: "Bake a new super macaroon with all of LiT's active " +
21-
"permissions.",
20+
Description: "Bake a new super macaroon with all of LiT's " +
21+
"active permissions.",
2222
Category: "LiT",
2323
Action: bakeSuperMacaroon,
2424
Flags: []cli.Flag{
@@ -47,8 +47,8 @@ var litCommands = []cli.Command{
4747
Name: "getinfo",
4848
Usage: "Returns basic information related to the active " +
4949
"daemon",
50-
Description: "Returns basic information related to the active " +
51-
"daemon.",
50+
Description: "Returns basic information related to the " +
51+
"active daemon.",
5252
Category: "LiT",
5353
Action: getInfo,
5454
},

0 commit comments

Comments
 (0)