Skip to content

Commit 6e3fbea

Browse files
committed
lint: add revive for exported docstrings
1 parent 5ab043e commit 6e3fbea

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

.golangci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ linters-settings:
2626
- G115 # Integer overflow conversion.
2727
staticcheck:
2828
checks: ["-SA1019"]
29+
revive:
30+
rules:
31+
- name: exported # To enforce conventions around exported comments.
32+
33+
issues:
34+
include:
35+
- EXC0012 # revive: Exported vars should have a docstring.
36+
- EXC0014 # revive: Exported vars's docstring should start with its name.
2937

3038
linters:
3139
enable-all: true
@@ -92,7 +100,6 @@ linters:
92100
- importas
93101
- interfacebloat
94102
- protogetter
95-
- revive
96103
- depguard
97104
- mnd
98105
- perfsprint

chainnotifier_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type NotifierOptions struct {
2929
ReOrgChan chan struct{}
3030
}
3131

32-
// defaultNotifierOptions returns the set of default options for the notifier.
32+
// DefaultNotifierOptions returns the set of default options for the notifier.
3333
func DefaultNotifierOptions() *NotifierOptions {
3434
return &NotifierOptions{}
3535
}

lightning_client.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3302,6 +3302,7 @@ func (s *lightningClient) CloseChannel(ctx context.Context,
33023302
return updateChan, errChan, nil
33033303
}
33043304

3305+
// InboundFee holds the inbound fee policy for a channel.
33053306
type InboundFee struct {
33063307
// BaseFeeMsat is the inbound base fee charged regardless of the number
33073308
// of milli-satoshis received in the channel. By default, only negative

macaroon_pouch.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
// with a specific lnrpc service.
1414
type LnrpcServiceMac string
1515

16+
//nolint:revive
1617
const (
1718
AdminServiceMac LnrpcServiceMac = "admin.macaroon"
1819
InvoiceServiceMac LnrpcServiceMac = "invoices.macaroon"

walletkit_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ func unmarshallOutputType(o lnrpc.OutputScriptType) txscript.ScriptClass {
648648
}
649649
}
650650

651-
// RPCTransaction returns a rpc transaction.
651+
// UnmarshalTransactionDetail returns a rpc transaction.
652652
func UnmarshalTransactionDetail(tx *lnrpc.Transaction,
653653
chainParams *chaincfg.Params) (*lnwallet.TransactionDetail, error) {
654654

0 commit comments

Comments
 (0)