vorteil/direktiv

View on GitHub
pkg/instancestore/instancestoresql/instance_data_query.go

Summary

Maintainability
A
2 hrs
Test Coverage

Method instanceDataQuery.UpdateInstanceData has 74 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (q *instanceDataQuery) UpdateInstanceData(ctx context.Context, args *instancestore.UpdateInstanceDataArgs) error {
    var vals []interface{}
    var clauses []string
    query := fmt.Sprintf("UPDATE %s", table)

Severity: Minor
Found in pkg/instancestore/instancestoresql/instance_data_query.go - About 1 hr to fix

    Method instanceDataQuery.PopMessage has 6 return statements (exceeds 4 allowed).
    Open

    func (q *instanceDataQuery) PopMessage(ctx context.Context) (*instancestore.InstanceMessageData, error) {
        columns := []string{fieldInstanceMessageID, fieldInstanceMessageInstanceID, fieldInstanceMessageCreatedAt, fieldInstanceMessagePayload}
        query := fmt.Sprintf(`SELECT %s FROM %s WHERE %s = ? ORDER BY %s ASC LIMIT 1`, strings.Join(columns, ", "), messagesTable, fieldInstanceMessageInstanceID, fieldInstanceMessageCreatedAt)
    
        msg := &instancestore.InstanceMessageData{}
    Severity: Major
    Found in pkg/instancestore/instancestoresql/instance_data_query.go - About 40 mins to fix

      There are no issues that match your filters.

      Category
      Status