Skip to content

Commit f11de71

Browse files
committed
Fix more linter errors
1 parent 12aef62 commit f11de71

File tree

15 files changed

+152
-86
lines changed

15 files changed

+152
-86
lines changed

.golangci.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ linters:
77
enable:
88
- bidichk
99
- bodyclose
10-
- errcheck
11-
- errname
1210
- errorlint
1311
- goprintffuncname
1412
- govet
@@ -28,24 +26,34 @@ linters:
2826
- wastedassign
2927
- whitespace
3028
- unused
31-
- goworkflows
29+
# - goworkflows
30+
disable:
31+
- errname
32+
- errcheck
33+
- errorlint
3234
settings:
3335
staticcheck:
3436
checks:
3537
- "all"
38+
- "-SA1019"
39+
- "-ST1000"
3640
- "-ST1003"
37-
custom:
38-
goworkflows:
39-
type: "module"
40-
original-url: "github.com/cschleiden/go-workflows/analyzer"
41-
settings:
42-
checkprivatereturnvalues: true
41+
- "-ST1005"
42+
- "-ST1012"
43+
- "-ST1020"
44+
- "-SA5010"
45+
# custom:
46+
# goworkflows:
47+
# type: "module"
48+
# original-url: "github.com/cschleiden/go-workflows/analyzer"
49+
# settings:
50+
# checkprivatereturnvalues: true
4351

4452

4553
formatters:
4654
enable:
4755
- gofmt
48-
- goimports
56+
# - goimports
4957
settings:
5058
goimports:
5159
local-prefixes:

backend/mysql/diagnostics.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ func (mb *mysqlBackend) GetWorkflowInstances(ctx context.Context, afterInstanceI
8484
})
8585
}
8686

87+
if rows.Err() != nil {
88+
return nil, rows.Err()
89+
}
90+
8791
return instances, nil
8892
}
8993

@@ -128,7 +132,7 @@ func (mb *mysqlBackend) GetWorkflowInstance(ctx context.Context, instance *core.
128132
}
129133

130134
return &diag.WorkflowInstanceRef{
131-
Instance: core.NewWorkflowInstance(id, executionID),
135+
Instance: instance,
132136
CreatedAt: createdAt,
133137
CompletedAt: completedAt,
134138
State: state,

0 commit comments

Comments
 (0)