linter: remove unsupported linters from the codebase
What changed, and why it matters
This commit only removes obsolete linter suppression comments (like `// nolint:scopelint`, `// nolint:structcheck`, `//nolint:gomnd`) from the source code. These comments tell automated code-quality tools to ignore certain warnings. Removing them does not change how the program runs, what data it processes, or how it handles errors. There is no security impact.
No security action needed. Treat as routine maintenance/cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff deletes // nolint:... directives from five files. No executable logic, function signatures, data structures, serialization formats, database schemas, or error-handling paths are modified. The changes are purely cosmetic/tooling-related to clean up linter configuration after unsupported linters were removed.
Changed components
channeldb/migration_01_to_11/migration_11_invoices_test.goinvoices/invoiceregistry.goitest/lnd_route_blinding_test.golnwire/typed_fee.gowatchtower/wtdb/client_db.goInspect captured patch +4 / −6
diff --git a/channeldb/migration_01_to_11/migration_11_invoices_test.go b/channeldb/migration_01_to_11/migration_11_invoices_test.go
index 55c188b..4098fe5 100644
--- a/channeldb/migration_01_to_11/migration_11_invoices_test.go
+++ b/channeldb/migration_01_to_11/migration_11_invoices_test.go
@@ -41,7 +41,7 @@ func beforeMigrationFuncV11(t *testing.T, d *DB, invoices []Invoice) {
invoiceNum++
var buf bytes.Buffer
- err := serializeInvoiceLegacy(&buf, &invoice) // nolint:scopelint
+ err := serializeInvoiceLegacy(&buf, &invoice)
if err != nil {
return err
}
diff --git a/invoices/invoiceregistry.go b/invoices/invoiceregistry.go
index 8815bb3..6528c4b 100644
--- a/invoices/invoiceregistry.go
+++ b/invoices/invoiceregistry.go
@@ -1581,7 +1581,7 @@ func (i *InvoiceRegistry) notifyClients(hash lntypes.Hash,
// invoiceSubscriptionKit defines that are common to both all invoice
// subscribers and single invoice subscribers.
type invoiceSubscriptionKit struct {
- id uint32 // nolint:structcheck
+ id uint32
// quit is a chan mouted to InvoiceRegistry that signals a shutdown.
quit chan struct{}
diff --git a/itest/lnd_route_blinding_test.go b/itest/lnd_route_blinding_test.go
index af2612d..b6c7f10 100644
--- a/itest/lnd_route_blinding_test.go
+++ b/itest/lnd_route_blinding_test.go
@@ -423,8 +423,6 @@ func (b *blindedForwardTest) cleanup() {
// createRouteToBlinded queries for a route from alice to the blinded path
// provided.
-//
-//nolint:gomnd
func (b *blindedForwardTest) createRouteToBlinded(paymentAmt int64,
blindedPath *lnrpc.BlindedPaymentPath) *lnrpc.Route {
diff --git a/lnwire/typed_fee.go b/lnwire/typed_fee.go
index 6b139f1..2a5c6b3 100644
--- a/lnwire/typed_fee.go
+++ b/lnwire/typed_fee.go
@@ -20,7 +20,7 @@ type Fee struct {
// type from a given TLV stream.
func (l *Fee) Record() tlv.Record {
return tlv.MakeStaticRecord(
- FeeRecordType, l, 8, feeEncoder, feeDecoder, //nolint:gomnd
+ FeeRecordType, l, 8, feeEncoder, feeDecoder,
)
}
diff --git a/watchtower/wtdb/client_db.go b/watchtower/wtdb/client_db.go
index 6e6adac..9fa03a3 100644
--- a/watchtower/wtdb/client_db.go
+++ b/watchtower/wtdb/client_db.go
@@ -2964,7 +2964,7 @@ func getRealChannelID(chanIDIndexBkt kvdb.RBucket,
}
chanIDBytes := chanIDIndexBkt.Get(dbIDBytes)
- if len(chanIDBytes) != 32 { //nolint:gomnd
+ if len(chanIDBytes) != 32 {
return nil, fmt.Errorf("channel ID not found")
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.