multi: rename nolint:lll to nolint:ll

Find and replace all nolint instances refering to the `lll` linter and
replace with `ll` which is the name of our custom version of the `lll`
linter which can be used to ignore log lines during linting.

The next commit will do the configuration of the custom linter and
disable the default one.
This commit is contained in:
Elle Mouton committed 2024-12-02 09:14:21 +02:00
1 parent 88f5369066
commit ab7aae0708
123 files changed
+286 -286

No files matched your search

+6 -6
View File
@@ -1658,7 +1658,7 @@ func (c *ChannelGraph) DisconnectBlockAtHeight(height uint32) (
var keys [][]byte
cursor := edgeIndex.ReadWriteCursor()
//nolint:lll
//nolint:ll
for k, v := cursor.Seek(chanIDStart[:]); k != nil &&
bytes.Compare(k, chanIDEnd[:]) < 0; k, v = cursor.Next() {
edgeInfoReader := bytes.NewReader(v)
@@ -1705,7 +1705,7 @@ func (c *ChannelGraph) DisconnectBlockAtHeight(height uint32) (
// the keys in a second loop.
var pruneKeys [][]byte
pruneCursor := pruneBucket.ReadWriteCursor()
//nolint:lll
//nolint:ll
for k, _ := pruneCursor.Seek(pruneKeyStart[:]); k != nil &&
bytes.Compare(k, pruneKeyEnd[:]) <= 0; k, _ = pruneCursor.Next() {
pruneKeys = append(pruneKeys, k)
@@ -2004,7 +2004,7 @@ func (c *ChannelGraph) ChanUpdatesInHorizon(startTime,
// the index collecting the info and policy of each update of
// each channel that has a last update within the time range.
//
//nolint:lll
//nolint:ll
for indexKey, _ := updateCursor.Seek(startTimeBytes[:]); indexKey != nil &&
bytes.Compare(indexKey, endTimeBytes[:]) <= 0; indexKey, _ = updateCursor.Next() {
@@ -2139,7 +2139,7 @@ func (c *ChannelGraph) NodeUpdatesInHorizon(startTime,
// the index collecting info for each node within the time
// range.
//
//nolint:lll
//nolint:ll
for indexKey, _ := updateCursor.Seek(startTimeBytes[:]); indexKey != nil &&
bytes.Compare(indexKey, endTimeBytes[:]) <= 0; indexKey, _ = updateCursor.Next() {
@@ -2377,7 +2377,7 @@ func (c *ChannelGraph) FilterChannelRange(startHeight,
// We'll now iterate through the database, and find each
// channel ID that resides within the specified range.
//
//nolint:lll
//nolint:ll
for k, v := cursor.Seek(chanIDStart[:]); k != nil &&
bytes.Compare(k, chanIDEnd[:]) <= 0; k, v = cursor.Next() {
// Don't send alias SCIDs during gossip sync.
@@ -3163,7 +3163,7 @@ func nodeTraversal(tx kvdb.RTx, nodePub []byte, db kvdb.Backend,
// as its prefix. This indicates that we've stepped over into
// another node's edges, so we can terminate our scan.
edgeCursor := edges.ReadCursor()
for nodeEdge, _ := edgeCursor.Seek(nodeStart[:]); bytes.HasPrefix(nodeEdge, nodePub); nodeEdge, _ = edgeCursor.Next() { //nolint:lll
for nodeEdge, _ := edgeCursor.Seek(nodeStart[:]); bytes.HasPrefix(nodeEdge, nodePub); nodeEdge, _ = edgeCursor.Next() { //nolint:ll
// If the prefix still matches, the channel id is
// returned in nodeEdge. Channel id is used to lookup
// the node at the other end of the channel and both
+4 -4
View File
@@ -1124,7 +1124,7 @@ func TestGraphTraversalCacheable(t *testing.T) {
tx, func(tx kvdb.RTx,
info *models.ChannelEdgeInfo,
policy *models.ChannelEdgePolicy,
policy2 *models.ChannelEdgePolicy) error { //nolint:lll
policy2 *models.ChannelEdgePolicy) error { //nolint:ll
delete(chanIndex, info.ChannelID)
return nil
@@ -2584,7 +2584,7 @@ func TestFilterChannelRange(t *testing.T) {
)
require.NoError(t, err)
expRes := channelRanges[test.expStartIndex:test.expEndIndex] //nolint:lll
expRes := channelRanges[test.expStartIndex:test.expEndIndex] //nolint:ll
if len(expRes) == 0 {
require.Nil(t, resp)
@@ -2598,7 +2598,7 @@ func TestFilterChannelRange(t *testing.T) {
)
require.NoError(t, err)
expRes = channelRangesWithTimestamps[test.expStartIndex:test.expEndIndex] //nolint:lll
expRes = channelRangesWithTimestamps[test.expStartIndex:test.expEndIndex] //nolint:ll
if len(expRes) == 0 {
require.Nil(t, resp)
@@ -3898,7 +3898,7 @@ func BenchmarkForEachChannel(b *testing.B) {
cb := func(tx kvdb.RTx,
info *models.ChannelEdgeInfo,
policy *models.ChannelEdgePolicy,
policy2 *models.ChannelEdgePolicy) error { //nolint:lll
policy2 *models.ChannelEdgePolicy) error { //nolint:ll
// We need to do something with
// the data here, otherwise the