Skip to content

Commit d38f4ec

Browse files
authored
Merge pull request #1170 from dlc-01/master
fix: scopelint linter
2 parents f8b0b48 + f27b85b commit d38f4ec

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ linters:
240240
- maintidx
241241
- nonamedreturns
242242
- paralleltest
243-
- scopelint
244243
- structcheck
245244
- testableexamples
246245
- testpackage
@@ -294,6 +293,7 @@ issues:
294293
- predeclared
295294
- path: _test\.go
296295
linters:
296+
- scopelint
297297
- funlen
298298
- unused
299299
- unparam

examples/ttl/series.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,10 @@ func createTables(ctx context.Context, c table.Client, prefix string) (err error
268268
}
269269

270270
for i := 0; i < expirationQueueCount; i++ {
271+
tableName := path.Join(prefix, fmt.Sprintf("expiration_queue_%v", i))
271272
err = c.Do(ctx,
272273
func(ctx context.Context, s table.Session) error {
273-
return s.CreateTable(ctx, path.Join(prefix, fmt.Sprintf("expiration_queue_%v", i)),
274+
return s.CreateTable(ctx, tableName,
274275
options.WithColumn("doc_id", types.Optional(types.TypeUint64)),
275276
options.WithColumn("ts", types.Optional(types.TypeUint64)),
276277
options.WithPrimaryKeyColumn("ts", "doc_id"),

internal/cmd/gtrace/writer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,9 @@ func (w *Writer) composeHookCall(fn *Func, h1, h2 string) {
406406
w.line("if " + h + " != nil {")
407407
w.block(func() {
408408
if fn.HasResult() {
409-
w.code(rs[i], ` = `)
409+
w.code(rs[i], ` = `) //nolint:scopelint
410410
}
411-
w.code(h)
411+
w.code(h) //nolint:scopelint
412412
w.call(args)
413413
})
414414
w.line("}")

0 commit comments

Comments
 (0)