diff --git a/build/ci/golangci.yml b/build/ci/golangci.yml index 78fcad6952..bc69cc2eff 100644 --- a/build/ci/golangci.yml +++ b/build/ci/golangci.yml @@ -137,6 +137,7 @@ linters: - importas - ineffassign - makezero + - musttag - nakedret - nilerr - noctx diff --git a/internal/pkg/service/common/etcdop/op/op_test.go b/internal/pkg/service/common/etcdop/op/op_test.go index 45ba373628..4f6789b7b3 100644 --- a/internal/pkg/service/common/etcdop/op/op_test.go +++ b/internal/pkg/service/common/etcdop/op/op_test.go @@ -21,7 +21,7 @@ type testOp struct { } type testValue struct { - Foo string + Foo string `json:"foo"` } type opTestCase[R any] struct { diff --git a/internal/pkg/service/stream/api/mapper/task.go b/internal/pkg/service/stream/api/mapper/task.go index 97d4811066..84986949b5 100644 --- a/internal/pkg/service/stream/api/mapper/task.go +++ b/internal/pkg/service/stream/api/mapper/task.go @@ -56,7 +56,7 @@ func (m *Mapper) NewTaskResponse(entity task.Task) (*api.Task, error) { // Outputs if entity.Outputs != nil { response.Outputs = &api.TaskOutputs{} - err := mapstructure.Decode(entity.Outputs, response.Outputs) + err := mapstructure.Decode(entity.Outputs, response.Outputs) // nolint: musttag if err != nil { return nil, err } diff --git a/internal/pkg/service/stream/migrate/core/source.go b/internal/pkg/service/stream/migrate/core/source.go index 618798dbd2..bcd6b23051 100644 --- a/internal/pkg/service/stream/migrate/core/source.go +++ b/internal/pkg/service/stream/migrate/core/source.go @@ -128,7 +128,7 @@ func (r *Receiver) createSourcePayload() (*bytes.Buffer, error) { } payloadBuf := new(bytes.Buffer) - err := json.NewEncoder(payloadBuf).Encode(s) + err := json.NewEncoder(payloadBuf).Encode(s) // nolint:musttag if err != nil { return nil, err } diff --git a/test/stream/bridge/keboola/setup_test.go b/test/stream/bridge/keboola/setup_test.go index ed0acc4bda..5c9927a516 100644 --- a/test/stream/bridge/keboola/setup_test.go +++ b/test/stream/bridge/keboola/setup_test.go @@ -316,7 +316,7 @@ func (ts *testState) setupSourceThroughAPI(t *testing.T, ctx context.Context, ex Type: "http", Name: "testSource", } - out, err := json.Marshal(payload) + out, err := json.Marshal(payload) // nolint:musttag if !assert.NoError(t, err) { ts.logger.Errorf(ctx, "unable to marshal source create payload: %v", err) return @@ -369,7 +369,7 @@ func (ts *testState) setupSinkThroughAPI(t *testing.T, ctx context.Context, expe Type: definition.SinkTypeTable, Name: "testSink", } - out, err := json.Marshal(payload) + out, err := json.Marshal(payload) // nolint:musttag if !assert.NoError(t, err) { ts.logger.Errorf(ctx, "unable to marshal sink create payload: %v", err) return