Skip to content

Commit

Permalink
Merge pull request #1170 from dlc-01/master
Browse files Browse the repository at this point in the history
fix: scopelint linter
  • Loading branch information
asmyasnikov authored Apr 10, 2024
2 parents f8b0b48 + f27b85b commit d38f4ec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ linters:
- maintidx
- nonamedreturns
- paralleltest
- scopelint
- structcheck
- testableexamples
- testpackage
Expand Down Expand Up @@ -294,6 +293,7 @@ issues:
- predeclared
- path: _test\.go
linters:
- scopelint
- funlen
- unused
- unparam
Expand Down
3 changes: 2 additions & 1 deletion examples/ttl/series.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,10 @@ func createTables(ctx context.Context, c table.Client, prefix string) (err error
}

for i := 0; i < expirationQueueCount; i++ {
tableName := path.Join(prefix, fmt.Sprintf("expiration_queue_%v", i))
err = c.Do(ctx,
func(ctx context.Context, s table.Session) error {
return s.CreateTable(ctx, path.Join(prefix, fmt.Sprintf("expiration_queue_%v", i)),
return s.CreateTable(ctx, tableName,
options.WithColumn("doc_id", types.Optional(types.TypeUint64)),
options.WithColumn("ts", types.Optional(types.TypeUint64)),
options.WithPrimaryKeyColumn("ts", "doc_id"),
Expand Down
4 changes: 2 additions & 2 deletions internal/cmd/gtrace/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,9 @@ func (w *Writer) composeHookCall(fn *Func, h1, h2 string) {
w.line("if " + h + " != nil {")
w.block(func() {
if fn.HasResult() {
w.code(rs[i], ` = `)
w.code(rs[i], ` = `) //nolint:scopelint
}
w.code(h)
w.code(h) //nolint:scopelint
w.call(args)
})
w.line("}")
Expand Down

0 comments on commit d38f4ec

Please sign in to comment.