Skip to content

Commit b86d1b9

Browse files
committed
add golangci-lint to makefile
1 parent 462a862 commit b86d1b9

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ vet:
1313
test:
1414
go test ./...
1515

16+
.PHONY: lint
17+
lint:
18+
golangci-lint run
19+
1620
.PHONY: build
1721
build:
1822
go build -o bin/clickhouse-go-linter .

passes/chbatchclose/chbatchclose.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func (b *batchUsage) report(varName string, pass *analysis.Pass) {
6464
// no usage of rows.Next()
6565
return
6666
}
67-
if !(b.deferredClose || b.returned) {
67+
if !b.deferredClose && !b.returned {
6868
pass.Reportf(b.assignPos,
6969
"clickhouse Batch %s must be closed defensively with defer %s.Close() after successful instantiation",
7070
varName, varName)

0 commit comments

Comments
 (0)