sunboyy/repogen

View on GitHub
internal/spec/update.go

Summary

Maintainability
A
1 hr
Test Coverage

Method interfaceMethodParser.parseUpdateOperation has 6 return statements (exceeds 4 allowed).
Open

func (p interfaceMethodParser) parseUpdateOperation(tokens []string) (Operation, error) {
    mode, err := p.extractIntOrBoolReturns(p.Signature.Results())
    if err != nil {
        return nil, err
    }
Severity: Major
Found in internal/spec/update.go - About 40 mins to fix

    Method interfaceMethodParser.parseUpdate has 5 return statements (exceeds 4 allowed).
    Open

    func (p interfaceMethodParser) parseUpdate(tokens []string) (Update, error) {
        if len(tokens) == 0 {
            expectedType := types.NewPointer(p.NamedStruct)
            if p.Signature.Params().Len() <= 1 || !types.Identical(p.Signature.Params().At(1).Type(), expectedType) {
                return nil, ErrInvalidUpdateFields
    Severity: Major
    Found in internal/spec/update.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status